Github bot update - allow Dapr maintainers to apply labels via bot comments #4417
+9,653
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for helping make the Dapr documentation better!
Please follow this checklist before submitting:
In addition, please fill out the following to help reviewers understand this pull request:
Description
The bot already allows users of issues to use an "/assign" command to assign themselves an issue if they aren't assigned already. I left that functionality alone and in-place as it applies to all users and works well enough.
But this PR augments that capability. Rather than taking the approach used in other Dapr repos of lists of users, this instead uses a third-party action (I read through the source and see nothing suspicious in there) to determine whether the user that has created the comment is a member of any of the Dapr maintainer org teams.
If so, it executes a separate github-script action that only executes if the following constraints are true:
If so, the associated label will be appended to the PR if not already present. I read through the labels available in dapr/docs and came up with the following list, which I think is reasonable for maintainers of other repos to want to use:
Finally, I have no idea how to test this out except by committing and giving it a whirl. If anyone has a clue how to otherwise test it, I'm all ears, but I can at least attest to the fact that the Firefox console had no objections to the syntax of the script.
Issue reference
N/A - raised by myself on Discord.