forked from mirrors/action-gh-release
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 ff30f8edb1
.
* Integrate latest changes from upstream.
This commit is contained in:
parent
0a4afc0be2
commit
03c4bc34bd
6 changed files with 73 additions and 19 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue