Support custom target_commitish value (#76)
* Make target_commitish configurable * Store compiled action for testing * Add target_commitish to metadata * Allow override of target_commitish for updating * Print commit usage * Improve message for commit usage * Update draft releases too * Revert "Update draft releases too" This reverts commit ff30f8edb18fa851785a2d361b03c9713f5ac17d. * Integrate latest changes from upstream.
This commit is contained in:
@ -37,7 +37,8 @@ describe("util", () => {
|
||||
input_prerelease: false,
|
||||
input_files: [],
|
||||
input_name: undefined,
|
||||
input_tag_name: undefined
|
||||
input_tag_name: undefined,
|
||||
input_target_commitish: undefined
|
||||
})
|
||||
);
|
||||
});
|
||||
@ -54,7 +55,8 @@ describe("util", () => {
|
||||
input_prerelease: false,
|
||||
input_files: [],
|
||||
input_name: undefined,
|
||||
input_tag_name: undefined
|
||||
input_tag_name: undefined,
|
||||
input_target_commitish: undefined
|
||||
})
|
||||
);
|
||||
});
|
||||
@ -71,7 +73,8 @@ describe("util", () => {
|
||||
input_prerelease: false,
|
||||
input_files: [],
|
||||
input_name: undefined,
|
||||
input_tag_name: undefined
|
||||
input_tag_name: undefined,
|
||||
input_target_commitish: undefined
|
||||
})
|
||||
);
|
||||
});
|
||||
@ -89,10 +92,34 @@ describe("util", () => {
|
||||
input_files: [],
|
||||
input_name: undefined,
|
||||
input_tag_name: undefined,
|
||||
input_fail_on_unmatched_files: false
|
||||
input_fail_on_unmatched_files: false,
|
||||
input_target_commitish: undefined
|
||||
});
|
||||
});
|
||||
});
|
||||
describe("parseConfig", () => {
|
||||
it("parses basic config with commitish", () => {
|
||||
assert.deepStrictEqual(
|
||||
parseConfig({
|
||||
INPUT_TARGET_COMMITISH: "affa18ef97bc9db20076945705aba8c516139abd"
|
||||
}),
|
||||
{
|
||||
github_ref: "",
|
||||
github_repository: "",
|
||||
github_token: "",
|
||||
input_body: undefined,
|
||||
input_body_path: undefined,
|
||||
input_draft: false,
|
||||
input_prerelease: false,
|
||||
input_files: [],
|
||||
input_name: undefined,
|
||||
input_tag_name: undefined,
|
||||
input_fail_on_unmatched_files: false,
|
||||
input_target_commitish: "affa18ef97bc9db20076945705aba8c516139abd"
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
describe("isTag", () => {
|
||||
it("returns true for tags", async () => {
|
||||
assert.equal(isTag("refs/tags/foo"), true);
|
||||
|
Reference in New Issue
Block a user