https://github.com/peter-murray/remove-labels-action
https://github.com/peter-murray/remove-labels-action
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/peter-murray/remove-labels-action
- Owner: peter-murray
- Created: 2021-04-15T10:43:17.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-30T11:05:58.000Z (about 5 years ago)
- Last Synced: 2024-03-15T12:22:04.878Z (over 2 years ago)
- Language: TypeScript
- Size: 97.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# remove-labels-action
A GitHub Action that will remove labels from Issues and Pull Requests.
## Parameters
* `github_token`: A GitHub token for access the Issue or Pull Request, will default to the `GITHUB_TOKEN` for the workflow if not specified.
* `labels`: `required` The labels, comma separated if there are more than one. e.g. "label1, label2, some_other label"
* `repo`: The repository in `/` form. Will default to the current repository for the workflow if not specified
* `issue_number`: The number for the Issue or Pull Request to remove the labels from, if not specified, the action will attempt to resolve the issue or pulle request number from the context (i.e. the event that triggered the workflow), failing if one cannot be resolved.
## Examples
Ensuring all labels are removed if currently present on an issue from an workflow event for an issue (like issues/issues_comments/pull_request):
```
- name: Remove all specified labels if present
uses: peter-murray/remove-labels-action@v1
with:
labels: bug, triage, process testing
```
Removing a single label from a specified issue on another repository:
```
- name: Remove bug label
uses: peter-murray/remove-labels-action@v1
with:
github_token: ${{ secrets.OCTODEMO_ACCESS_TOKEN }}
labels: bug
repo: octodemo/testing
issue_number: 1
```