This repository has been archived by the owner on Oct 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from lionel1704/remove-label-feature
Add feature to remove labels
- Loading branch information
Showing
3 changed files
with
38 additions
and
12 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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
Automatically labels issues, by adding new labels to the issue. You define the labels you'd like to add to your issues in the YAML file. | ||
Automatically adds or removes labels from issues. You define the labels you'd like to add and/or remove in the YAML file. | ||
|
||
To add it to your workflow: | ||
|
||
``` | ||
- uses: andymckay/[email protected] | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
labels: "needs-triage, bug" | ||
add-labels: "needs-triage, bug" | ||
``` | ||
|
||
This adds the `needs-triage` and `bug` labels to the issue. The most common approach is to do this when issues are created, you can do this with the following in your workflow file: | ||
|
@@ -17,4 +17,19 @@ on: | |
types: [opened] | ||
``` | ||
|
||
That's it. | ||
This action can also be used to remove labels from an issue. Just pass the label(s) to be removed separated by commas. | ||
|
||
``` | ||
- uses: andymckay/[email protected] | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
remove-labels: "help-wanted" | ||
``` | ||
|
||
An example use-case would be, to remove the `help-wanted` label when an issue is assigned to someone. For this, the workflow file would look like: | ||
|
||
``` | ||
on: | ||
issues: | ||
types: [assigned] | ||
``` |
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
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