chore(deps): update dependency recipeengine.modules.wrench to 0.10.49 (develop) #206
This file contains hidden or 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 workflow will update issues with proper "conversation related" labels. This mean that stat:awaiting-repsonse label will be present after Unity account made comments and stat:reply-needed will be present when user made latest comment | |
name: Update conversation labels of the issue | |
# Trigger for the workflow | |
# This trigger will populate the github.event object | |
# Details on properties are here: https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=created#issue_comment | |
on: | |
issue_comment: | |
types: [created] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.issue.number }} | |
cancel-in-progress: true | |
# Define labels here | |
env: | |
AWAITING_RESPONSE: stat:awaiting-response | |
REPLY_NEEDED: stat:reply-needed | |
jobs: | |
conversation_labels: | |
name: Calculate and update conversation labels of the issue | |
if: ${{ !github.event.issue.pull_request && github.event.issue.state == 'open' }} | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- name: Calculate labels | |
run: | | |
if [[ "${{ github.event.comment.author_association }}" == "MEMBER" ]]; then | |
# Unity member commented - add awaiting-response, remove reply-needed | |
echo "ADD=${{ env.AWAITING_RESPONSE }}" >> $GITHUB_ENV | |
echo "REMOVE=${{ env.REPLY_NEEDED }}" >> $GITHUB_ENV | |
else | |
# Non-Unity member commented - add reply-needed, remove awaiting-response | |
echo "ADD=${{ env.REPLY_NEEDED }}" >> $GITHUB_ENV | |
echo "REMOVE=${{ env.AWAITING_RESPONSE }}" >> $GITHUB_ENV | |
fi | |
- name: Update labels | |
# This runs a command using the github cli: https://cli.github.com/manual/gh_issue_edit | |
# If $ADD is set, it will add the label, otherwise it will remove the label | |
# There is no need to check if $ADD or $REMOVE is set, as the command will ignore it if it is empty | |
run: gh issue edit "$NUMBER" --add-label "$ADD" --remove-label "$REMOVE" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GH_REPO: ${{ github.repository }} | |
NUMBER: ${{ github.event.issue.number }} |