-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
Check for assignees and new labels on an issue
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Automatically adds or removes labels from issues. You define the labels you'd like to add and/or remove 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. You can also specify if an issue should be ignored if an assignee has been added. | ||
|
||
To add it to your workflow: | ||
|
||
|
@@ -7,6 +7,7 @@ To add it to your workflow: | |
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
add-labels: "needs-triage, bug" | ||
ignore-if-assigned: true | ||
``` | ||
|
||
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,13 +18,16 @@ on: | |
types: [opened] | ||
``` | ||
|
||
The parameter `ignore-if-assigned` checks at the time of the action running if the issue has been assigned to anyone. If set to `True` and the issue is assigned to anyone, then no labels will be added or removed. This can be helpful for new issues that immediatly get labels or assignees and don't require any action to be taken. | ||
|
||
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" | ||
ignore-if-assigned: false | ||
``` | ||
|
||
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: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.