https://github.com/mondeja/remove-labels-gh-action
Remove labels from GitHub issues or pull requests
https://github.com/mondeja/remove-labels-gh-action
Last synced: 6 months ago
JSON representation
Remove labels from GitHub issues or pull requests
- Host: GitHub
- URL: https://github.com/mondeja/remove-labels-gh-action
- Owner: mondeja
- License: bsd-3-clause
- Created: 2020-12-12T15:11:55.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T16:41:33.000Z (over 1 year ago)
- Last Synced: 2024-11-03T16:03:18.426Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.36 MB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Remove labels GitHub action
Remove labels from pull requests and issues.
If the issue or pull request does not contains the label/s, it does nothing.## Inputs
- **token**: Github token.
- **labels**: Labels to remove.## Usage
```yaml
name: Remove outdated labelson:
pull_request:
types:
- closed
issues:
types:
- closedpermissions:
issues: write
pull-requests: writejobs:
remove-merged-pr-labels:
name: Remove merged pull request labels
if: github.event.pull_request.merged
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
awaiting reply
changes requested
duplicate
in discussion
invalid
out of scope
pending
won't addremove-closed-pr-labels:
name: Remove closed pull request labels
if: github.event_name == 'pull_request' && (! github.event.pull_request.merged)
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: in discussionremove-closed-issue-labels:
name: Remove closed issue labels
if: github.event.issue.state == 'closed'
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
in discussion
pending
```