This commit is contained in:
Jill Regan
2026-06-17 11:05:03 -04:00
parent dbef05db1e
commit 94f19656f9
3 changed files with 16 additions and 5 deletions
+5 -2
View File
@@ -38392,11 +38392,14 @@ const extractSecret = (envName, shouldExportEnv) => {
}
};
const loadSecrets = async (shouldExportEnv) => {
// Pass User-Agent Information to the 1Password CLI
// Pass User-Agent Information to the 1Password CLI.
// Strip any prerelease suffix ("-beta.1") since semverToInt only
// accepts a plain MAJOR.MINOR.PATCH; a prerelease produces an invalid build.
const [releaseVersion] = package_namespaceObject.rE.split("-");
(0,dist.setClientInfo)({
name: "1Password GitHub Action",
id: "GHA",
build: (0,dist.semverToInt)(package_namespaceObject.rE),
build: (0,dist.semverToInt)(releaseVersion ?? package_namespaceObject.rE),
});
// Load secrets from environment variables using 1Password CLI.
// Iterate over them to find 1Password references, extract the secret values,
+6 -1
View File
@@ -78,7 +78,12 @@ describe("loadSecretsFromSDK", () => {
});
it("masks the integration key and strips its base64 padding", async () => {
await loadSecretsFromSDK(workloadId, environmentId, "integration-key==", false);
await loadSecretsFromSDK(
workloadId,
environmentId,
"integration-key==",
false,
);
expect(core.setSecret).toHaveBeenCalledWith("integration-key");
});
+5 -2
View File
@@ -111,11 +111,14 @@ export const extractSecret = (
};
export const loadSecrets = async (shouldExportEnv: boolean): Promise<void> => {
// Pass User-Agent Information to the 1Password CLI
// Pass User-Agent Information to the 1Password CLI.
// Strip any prerelease suffix ("-beta.1") since semverToInt only
// accepts a plain MAJOR.MINOR.PATCH; a prerelease produces an invalid build.
const [releaseVersion] = version.split("-");
setClientInfo({
name: "1Password GitHub Action",
id: "GHA",
build: semverToInt(version),
build: semverToInt(releaseVersion ?? version),
});
// Load secrets from environment variables using 1Password CLI.