Skip to content

Commit

Permalink
Merge pull request #21 from GUI/enterprise
Browse files Browse the repository at this point in the history
Fix compatibility with GitHub Enterprise; More logging; Increase retries
  • Loading branch information
wechuli authored Jun 10, 2024
2 parents 6788d8f + 0ad3537 commit 2e5e8bb
Show file tree
Hide file tree
Showing 19 changed files with 2,932 additions and 133 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,20 @@ for all checks to complete before reporting a failure, you can set the fail_fast
```

### Verbose logging

To enable additional logging when the action runs, you may enable the `verbose` mode (defaults to false). The additional
logs will indicate which specific checks are being waited on in each polling iteration. This may be helpful in debugging
what checks are matched by `checks_include` or `checks_exclude`.

```yaml
steps:
- uses: wechuli/allcheckspassed@v1
with:
verbose: true
```


## Setup with environments

This action is essentially a workflow run that will consume your GitHub Actions minutes. You may want to delay the
Expand Down
12 changes: 5 additions & 7 deletions __tests__/inputs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@ describe("validateIntervalValues", () => {
expect(validateIntervalValues(NaN)).toBe(1);
});

it("returns 360 if input is Infinity", () => {
expect(validateIntervalValues(Infinity)).toBe(360);
it("returns 1 if input is Infinity", () => {
expect(validateIntervalValues(Infinity)).toBe(1);
});

it("returns 360 if input is greater than 360", () => {
expect(validateIntervalValues(361)).toBe(360);
expect(validateIntervalValues(1000)).toBe(360);
});
it("returns input if input is between 0 and 360", () => {
it("returns input for inputs greater than 0", () => {
expect(validateIntervalValues(0)).toBe(0);
expect(validateIntervalValues(1)).toBe(1);
expect(validateIntervalValues(2)).toBe(2);
expect(validateIntervalValues(359)).toBe(359);
expect(validateIntervalValues(360)).toBe(360);
expect(validateIntervalValues(361)).toBe(361);
expect(validateIntervalValues(1000)).toBe(1000);
});

it("return 1 if input i negative infinity", () => {
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ inputs:
description: "If set to true, the action will fail if one or more checks defined on the checks_include input are not found on the commit"
required: false
default: "false"
verbose:
description: "If set to true, the action will log which checks are being waited on in each iteration"
required: false
default: "false"

outputs:
checks:
Expand Down
13 changes: 11 additions & 2 deletions dist/checks/checks.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/checks/checks.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/checks/checksConstants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2e5e8bb

Please sign in to comment.