-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stuart Izon
committed
Jan 4, 2024
0 parents
commit cf0fd34
Showing
10 changed files
with
41,781 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Check dist | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
check-dist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.x | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Rebuild the index.js file | ||
run: npm run build | ||
- name: Compare the expected and actual dist/ directories | ||
id: diff | ||
run: | | ||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||
echo "Detected uncommitted changes after build. See status below:" | ||
git diff | ||
exit 1 | ||
fi | ||
- name: Upload diff artifact | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ failure() && steps.diff.conclusion == 'failure' }} | ||
with: | ||
name: dist | ||
path: dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: RelationalAI/abandoned | ||
with: | ||
days: 7 | ||
token: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Contributing | ||
|
||
Before pushing a change, update `dist/index.js` using `npm run build`. This creates a single javascript file that is used as an entrypoint for the action. | ||
Failure to do so will generate a build failure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Abandoned | ||
This action finds old, abandoned PRs for a given repository. | ||
|
||
# Usage | ||
``` | ||
- uses: RelationalAI/abandoned | ||
with: | ||
# Number of days before PR should be considered abandoned | ||
days: 7 | ||
# Personal access token (PAT) with access to the repository. | ||
# Default: ${{ github.token }} | ||
token: '' | ||
``` | ||
|
||
# Output | ||
A single output `pulls` contains the list of abandoned PRs. It is structured as an array, where each entry has the following fields: | ||
- `title` - the title of the GitHub PR | ||
- `ref` - the ref for the HEAD of the PR branch | ||
- `sha` - the SHA for the HEAD of the PR branch | ||
- `url` - the HTML url page for the PR | ||
|
||
This array can be fed into [matrix jobs](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs) to run a given task for each PR. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'Abandoned' | ||
description: 'Finds old, abandoned PRs in a given repository' | ||
|
||
inputs: | ||
days: | ||
description: 'Number of days before PR should be considered abandoned' | ||
required: false | ||
default: '7' | ||
token: | ||
required: true | ||
description: 'GitHub token' | ||
|
||
outputs: | ||
pulls: | ||
description: 'Array of PR objects (title, ref, sha and url)' | ||
|
||
runs: | ||
using: "node20" | ||
main: 'dist/index.js' |
Oops, something went wrong.