Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shioyang/check-pr-labels-on-push-action
Check the PR labels contain given labels
https://github.com/shioyang/check-pr-labels-on-push-action
actions github-actions
Last synced: 3 months ago
JSON representation
Check the PR labels contain given labels
- Host: GitHub
- URL: https://github.com/shioyang/check-pr-labels-on-push-action
- Owner: shioyang
- License: mit
- Created: 2020-05-29T00:12:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-04T17:37:06.000Z (10 months ago)
- Last Synced: 2024-10-30T06:29:11.166Z (3 months ago)
- Topics: actions, github-actions
- Language: TypeScript
- Homepage:
- Size: 196 KB
- Stars: 16
- Watchers: 2
- Forks: 17
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Check PR Labels on Push Action
This action check if given ALL labels have be applied to the PR when pushed.
## Inputs
### `github-token`
**Required** The repository token, i.e. `secrets.GITHUB_TOKEN`
### `labels`
**Required** The array of label name, e.g. `'["label-1", "label-2"]'`
## Outputs
### `result`
The result if given ALL labels have be applied to the PR
## Example Usage
```
uses: shioyang/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
labels: '["label-1", "label-2"]'
```### Example Workflow
e.g. [.github/workflows/main.yml](https://github.com/shioyang/check-pr-labels-on-push-action/blob/master/.github/workflows/main.yml)
```
on:
push:
branches:
- masterjobs:
check_pr_labels_job:
runs-on: ubuntu-latest
name: A job to check the PR labels contain given labels
steps:
- name: Check PR labels action step
id: check_pr_labels
uses: shioyang/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
labels: '["enhancement"]'
timeout-minutes: 5
- name: See result
run: echo "${{ steps.check_pr_labels.outputs.result }}"
```