Skip to content

Commit

Permalink
actually stale is not allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisBrunner committed Jul 25, 2023
1 parent a1e5113 commit 0e8a1a8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Test Basic stale
name: Test Basic Stale
conclusion: stale

# With details
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ _Optional_ The SHA of the target commit. Defaults to the current commit.

### `conclusion`

_Optional_ (**Required** if `status` is `completed`, the default) The conclusion of your check, can be either `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required`, `skipped` or `stale`
_Optional_ (**Required** if `status` is `completed`, the default) The conclusion of your check, can be either `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `skipped`

### `status`

Expand Down
4 changes: 2 additions & 2 deletions dist/index.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ export const parseInputs = (getInput: GetInput): Inputs.Args => {
if (conclusion) {
conclusion = conclusion.toLowerCase() as Inputs.Conclusion;
if (!Object.values(Inputs.Conclusion).includes(conclusion)) {
if (conclusion.toString() === 'stale') {
throw new Error(`'stale' is a conclusion reserved for GitHub and cannot be set manually`);
}
throw new Error(`invalid value for 'conclusion': '${conclusion}'`);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/namespaces/Inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export enum Conclusion {
TimedOut = 'timed_out',
ActionRequired = 'action_required',
Skipped = 'skipped',
Stale = 'stale',
}

export enum Status {
Expand Down

0 comments on commit 0e8a1a8

Please sign in to comment.