Skip to content

Commit

Permalink
feat: add merge queue helpers (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
danadajian authored Dec 27, 2021
1 parent a1cc53a commit 54b2619
Show file tree
Hide file tree
Showing 41 changed files with 1,906 additions and 28 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/manage-merge-queue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Manage Merge Queue

on:
pull_request:
branches: [ main ]
types: [ synchronize, labeled, unlabeled, closed ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: ./
with:
helper: manage-merge-queue
sha: ${{ github.event.pull_request.head.sha }}
github_token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Additionally, the following parameters can be used for additional control over t
* Returns a comma-separated list of changed files for a PR
### [**initiate-deployment**](.github/workflows/initiate-deployment.yml)
* Creates a new in-progress Github "deployment" for a commit. More information on Github deployment events can be found [here](https://docs.github.com/en/rest/reference/repos#deployments)
### [**manage-merge-queue**](.github/workflows/manage-merge-queue.yml)
* Manages a queue for PRs. Can be used to build a fully automated merge queue when used in conjunction with `prepare-queued-pr-for-merge`.
### [**notify-pipeline-complete**](.github/workflows/notify-pipeline-complete.yml)
* Sets a "pipeline" commit status to green for all open PRs
### [**prepare-queued-pr-for-merge**](.github/workflows/prepare-queued-pr-for-merge.yml)
Expand All @@ -75,7 +77,7 @@ with:
github_token: ${{ secrets.GITHUB_TOKEN }}
```
The `helper` and `github_token` inputs are required for all helpers. Additional inputs vary by helper. Each helper file in `src/helpers` contains an interface that defines which additional inputs are required or optional.
The `helper` and `github_token` inputs are required for all helpers. Additional inputs vary by helper. Each helper file in `src/helpers` contains an interface that defines which additional inputs are required or optional.

### Example
Input interface in `src/helpers/set-commit-status.ts`:
Expand Down
4 changes: 3 additions & 1 deletion dist/0.index.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/0.index.js.map

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

4 changes: 3 additions & 1 deletion dist/101.index.js

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

Loading

0 comments on commit 54b2619

Please sign in to comment.