diff --git a/.github/workflows/add-hacktoberfest-label.yml b/.github/workflows/add-hacktoberfest-label.yml index 2fbbecf..9bf1a16 100644 --- a/.github/workflows/add-hacktoberfest-label.yml +++ b/.github/workflows/add-hacktoberfest-label.yml @@ -11,21 +11,22 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout the repository - uses: actions/checkout@v3 - - name: Add Hacktoberfest labels to issues if: github.event_name == 'issues' - run: | - curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels \ - -d '{"labels":["hacktoberfest", "hacktoberfest-accepted", "hacktoberfest2024"]}' + uses: actions-ecosystem/action-add-labels@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: | + hacktoberfest + hacktoberfest-accepted + hacktoberfest2024 - name: Add Hacktoberfest labels to pull requests if: github.event_name == 'pull_request' - run: | - curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \ - -d '{"labels":["hacktoberfest", "hacktoberfest-accepted", "hacktoberfest2024"]}' + uses: actions-ecosystem/action-add-labels@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: | + hacktoberfest + hacktoberfest-accepted + hacktoberfest2024