Skip to content

Commit

Permalink
Update update_label.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
codycooperross authored Jul 26, 2024
1 parent 0ba691b commit fdb8fdf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/update_label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ jobs:
permissions:
issues: write
steps:
- run: gh label list -R $DEST_REPO | grep "$NAME" && gh label edit "$NAME" -n "$NEW_NAME" -c $NEW_COLOR -d "$NEW_DESCRIPTION" -R $DEST_REPO
- run: |
response=$(gh label edit "$NAME" -n "$NEW_NAME" -c $NEW_COLOR -d "$NEW_DESCRIPTION" -R $DEST_REPO 2>&1)
exit_code=$?
if [[ "$response" == *"404"* ]] || [[ $exit_code != 1 ]]; then
exit 0
else
exit 1
fi
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_REPO: ${{ github.repository }}
Expand Down

0 comments on commit fdb8fdf

Please sign in to comment.