Skip to content

Commit

Permalink
Update auto-labeler.yml
Browse files Browse the repository at this point in the history
Fixed a bug that labels every closed PR with `hacktoberfest-accepted` label even though they are not merged.
  • Loading branch information
iamwatchdogs authored Oct 25, 2024
1 parent aad3240 commit 0cfd740
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/auto-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,24 @@ jobs:
fi
- name: Creating config file
env:
env:
ACTION: ${{ github.event.action }}
MERGED: ${{ github.event.pull_request.merged }}
run: |
touch ./hacktoberfest-labeler.yml
if [ "$ACTION" != "closed" ]; then
echo "ACTION Value = $ACTION\n\n"
echo "MERGED Value = $MERGED\n\n"
if [ "$ACTION" == "opened" ]; then
echo "hacktoberfest:" > hacktoberfest-labeler.yml
else
elif [ "$MERGED" == "true" ]; then
echo "hacktoberfest-accepted:" > hacktoberfest-labeler.yml
else
echo "invalid:" > hacktoberfest-labeler.yml
fi
echo "- changed-files:" >> hacktoberfest-labeler.yml
echo " - any-glob-to-any-file: '**'" >> hacktoberfest-labeler.yml
echo "Created the config file:"
echo "------------------------"
cat ./hacktoberfest-labeler.yml
Expand Down

0 comments on commit 0cfd740

Please sign in to comment.