From 2e23f46c906509b65becb99a96e7ff928011a5db Mon Sep 17 00:00:00 2001 From: Jolly / Formen <83844571+JollyJolli@users.noreply.github.com> Date: Mon, 21 Oct 2024 07:27:49 -0600 Subject: [PATCH] Update add-hacktoberfest-label.yml --- .github/workflows/add-hacktoberfest-label.yml | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) 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