From b70b5ae6c4a5ff6755f7e9292981f9e4827bef64 Mon Sep 17 00:00:00 2001 From: Hugofbf21 <79162965+Hugofbf21@users.noreply.github.com> Date: Tue, 15 Jul 2025 14:58:22 +0100 Subject: [PATCH 1/6] Create welcome.yml Fist step in exercise --- .github/workflows/welcome.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/workflows/welcome.yml diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml new file mode 100644 index 0000000..6c9a6eb --- /dev/null +++ b/.github/workflows/welcome.yml @@ -0,0 +1,6 @@ +name: Post welcome comment +on: + pull_request: + types: [opened] +permissions: + pull-requests: write From bcf8c910b2c5d8cbd7a2f5624a9acf096cfeec8a Mon Sep 17 00:00:00 2001 From: Hugofbf21 <79162965+Hugofbf21@users.noreply.github.com> Date: Tue, 15 Jul 2025 15:02:47 +0100 Subject: [PATCH 2/6] Update welcome.yml Add a job that runs on ubuntu-latest --- .github/workflows/welcome.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 6c9a6eb..7b96b45 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -4,3 +4,7 @@ on: types: [opened] permissions: pull-requests: write +jobs: + welcome: + name: Post welcome comment + runs-on: ubuntu-latest From 963a613e199ea8dabdb7585d1d2df55baddaff17 Mon Sep 17 00:00:00 2001 From: Hugofbf21 <79162965+Hugofbf21@users.noreply.github.com> Date: Tue, 15 Jul 2025 15:06:42 +0100 Subject: [PATCH 3/6] Update welcome.yml Added step that comments on the pr --- .github/workflows/welcome.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 7b96b45..6994ab4 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -8,3 +8,8 @@ jobs: welcome: name: Post welcome comment runs-on: ubuntu-latest + steps: + - run: gh pr comment "$PR_URL" --body "Welcome to the repository!" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.evennt.pull_request.html_url }} From bf33732bfba1df781260ae03fb01e1200bdcc70b Mon Sep 17 00:00:00 2001 From: Hugofbf21 <79162965+Hugofbf21@users.noreply.github.com> Date: Tue, 15 Jul 2025 15:09:19 +0100 Subject: [PATCH 4/6] Update welcome.yml --- .github/workflows/welcome.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 6994ab4..2c37418 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -9,7 +9,7 @@ jobs: name: Post welcome comment runs-on: ubuntu-latest steps: - - run: gh pr comment "$PR_URL" --body "Welcome to the repository!" + - run: gh pr comment ${{PR_URL}} --body "Welcome to the repository!" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_URL: ${{ github.evennt.pull_request.html_url }} From 3b4456b9e9384b753ffdfb0339adfed6d27aa63a Mon Sep 17 00:00:00 2001 From: Hugofbf21 <79162965+Hugofbf21@users.noreply.github.com> Date: Tue, 15 Jul 2025 15:10:07 +0100 Subject: [PATCH 5/6] Update welcome.yml --- .github/workflows/welcome.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 2c37418..d270e47 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -9,7 +9,7 @@ jobs: name: Post welcome comment runs-on: ubuntu-latest steps: - - run: gh pr comment ${{PR_URL}} --body "Welcome to the repository!" + - run: gh pr comment "${{PR_URL}}" --body "Welcome to the repository!" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_URL: ${{ github.evennt.pull_request.html_url }} From 4b81713243d6e7303f442f24f476112f5d71cb3d Mon Sep 17 00:00:00 2001 From: Hugofbf21 <79162965+Hugofbf21@users.noreply.github.com> Date: Tue, 15 Jul 2025 15:11:23 +0100 Subject: [PATCH 6/6] Update welcome.yml Got the typo --- .github/workflows/welcome.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index d270e47..3c514e5 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -9,7 +9,7 @@ jobs: name: Post welcome comment runs-on: ubuntu-latest steps: - - run: gh pr comment "${{PR_URL}}" --body "Welcome to the repository!" + - run: gh pr comment "$PR_URL" --body "Welcome to the repository!" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_URL: ${{ github.evennt.pull_request.html_url }} + PR_URL: ${{ github.event.pull_request.html_url }}