Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to JS #8

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[*.{js,mjs}]
indent_size = 2
19 changes: 19 additions & 0 deletions .github/workflows/is-dist-up-to-date.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Verify built files are up to date
on:
pull_request:
merge_group:

jobs:
verify:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Verify that built files are up to date
run: git diff --exit-code
17 changes: 17 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Lint
on:
pull_request:
merge_group:

jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
| interval | The number of seconds in between polls of the GitHub API for check run conclusions. | No | `5` |
| timeout | The number of seconds before the job is declared a failure if check runs have not yet concluded. | No | `300` |
| name | The name of the Sloth's own check run. This is used to ensure Sloth does not wait upon itself. | No | `"sloth"` |
| ignored | A comma separated list of check run names to ignore when determining an overall result. | No | `""` |
| ignored | A multi-line list of check run names to ignore when determining an overall result. | No | `""` |
23 changes: 3 additions & 20 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ inputs:
description: "Commit sha, branch, tag, or whatever"
required: false
default: ${{ github.event.pull_request.head.sha || github.sha }}
initial-delay:
description: "Initial delay in seconds before fetching checks (default 5)"
required: false
default: "5"
interval:
description: "Interval in seconds between check of checks (default 5)"
required: false
Expand All @@ -28,22 +24,9 @@ inputs:
required: false
default: "sloth"
ignored:
description: "Conclusions of which jobs to ignore, comma separated"
description: "Conclusions of which jobs to ignore, specify multiple values as multi-line"
required: false
default: ""
runs:
using: "composite"
steps:
- name: Await CI outcome
id: sloth
shell: bash
run: |
${GITHUB_ACTION_PATH}/bin/sloth.sh \
${{ inputs.token }} \
${{ inputs.ref }} \
${{ github.repository }} \
${{ inputs.initial-delay }} \
${{ inputs.interval }} \
${{ inputs.timeout }} \
"${{ inputs.name }}" \
"${{ inputs.ignored }}"
using: node20
main: dist/index.js
95 changes: 0 additions & 95 deletions bin/sloth.sh

This file was deleted.

Loading