Add number_force input and tests for PR #1652

Co-authored-by: marocchino <128431+marocchino@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-13 12:16:18 +00:00
parent ff69574fa9
commit 19a13e0618
4 changed files with 116 additions and 1 deletions

View file

@ -78,6 +78,7 @@ afterEach(() => {
delete process.env["INPUT_IGNORE_EMPTY"]
delete process.env["INPUT_SKIP_UNCHANGED"]
delete process.env["INPUT_FOLLOW_SYMBOLIC_LINKS"]
delete process.env["INPUT_NUMBER_FORCE"]
})
test("repo", async () => {
@ -428,3 +429,26 @@ test("skip_unchanged", async () => {
})
expect(await config.getBody()).toEqual("")
})
test("number_force", async () => {
process.env["INPUT_NUMBER_FORCE"] = "456"
mockConfig.pullRequestNumber = 456
const config = await import('../src/config')
expect(config).toMatchObject({
pullRequestNumber: 456,
repo: {owner: "marocchino", repo: "stick-pull-request-comment"},
header: "",
append: false,
recreate: false,
deleteOldComment: false,
hideOldComment: false,
hideAndRecreate: false,
hideClassify: "OUTDATED",
hideDetails: false,
githubToken: "some-token",
ignoreEmpty: false,
skipUnchanged: false
})
expect(await config.getBody()).toEqual("")
})