From b01a7dfd174443bbb6315c222649218652d00e3a Mon Sep 17 00:00:00 2001 From: Marcus Benoit <54507045+SeaBebop@users.noreply.github.com> Date: Mon, 23 Oct 2023 17:39:21 -0400 Subject: [PATCH 1/2] Attempt at fixing greetings.yml Added a conditional that covers both pr and issue events --- .github/workflows/greetings.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index c388e4e..fd935af 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -9,8 +9,17 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/first-interaction@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: "Thank you ${{ github.event.pull_request.user.login }} for bringing up this issue to help enhance our project even further! We'll review it soon. 🙌❤️" - pr-message: "Thank you for opening a pull request ${{ github.event.pull_request.user.login }}. We'll will review it as soon as possible 🙌❤️" + - name: Set Condition + id: condition + run: | + if [[ "${{ github.event_name }}" == 'issues' ]]; then + echo "username=${{ github.event.issue.user.login }}" >> $GITHUB_ENV + else + echo "username=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV + fi + - name: Greet User + uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "Thank you ${{ env.username }} for bringing up this issue to help enhance our project even further! We'll review it soon. 🙌❤️" + pr-message: "Thank you for opening a pull request ${{ env.username }}. We'll will review it as soon as possible 🙌❤️" From 74889a284ffc604f07af2b0e9b552cab7d567b9b Mon Sep 17 00:00:00 2001 From: Marcus Benoit <54507045+SeaBebop@users.noreply.github.com> Date: Tue, 24 Oct 2023 01:03:58 -0400 Subject: [PATCH 2/2] Added @ for greetings.yml --- .github/workflows/greetings.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index fd935af..a20a9aa 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -21,5 +21,5 @@ jobs: uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: "Thank you ${{ env.username }} for bringing up this issue to help enhance our project even further! We'll review it soon. 🙌❤️" - pr-message: "Thank you for opening a pull request ${{ env.username }}. We'll will review it as soon as possible 🙌❤️" + issue-message: "Thank you @${{ env.username }} for bringing up this issue to help enhance our project even further! We'll review it soon. 🙌❤️" + pr-message: "Thank you for opening a pull request @${{ env.username }}. We'll will review it as soon as possible 🙌❤️"