From 7457000ea2258bc991309794791c7051b4535951 Mon Sep 17 00:00:00 2001 From: Woman4Coding <12531583+Woman4Coding@users.noreply.github.com> Date: Fri, 20 Mar 2026 20:51:26 +0100 Subject: [PATCH 1/5] Add GitHub Actions workflow for welcome comments --- .github/workflows/welcome.yml | 5 +++++ 1 file changed, 5 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..b02b9a8 --- /dev/null +++ b/.github/workflows/welcome.yml @@ -0,0 +1,5 @@ +name: Post welcome comment +on: + pull_request: + types: [opened] +permissions: write From 6d8a0c39227c1cb8376a0803ec6db00dd47f77ff Mon Sep 17 00:00:00 2001 From: Woman4Coding <12531583+Woman4Coding@users.noreply.github.com> Date: Fri, 20 Mar 2026 20:54:08 +0100 Subject: [PATCH 2/5] Change permissions from 'write' to 'write-all' --- .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 b02b9a8..7bc8d38 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -2,4 +2,4 @@ name: Post welcome comment on: pull_request: types: [opened] -permissions: write +permissions: write-all From 27c9d80400b5c675e6ce725c74ba9f728d728ce2 Mon Sep 17 00:00:00 2001 From: Woman4Coding <12531583+Woman4Coding@users.noreply.github.com> Date: Fri, 20 Mar 2026 20:55:43 +0100 Subject: [PATCH 3/5] Update permissions for pull request welcome comment --- .github/workflows/welcome.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 7bc8d38..6c9a6eb 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -2,4 +2,5 @@ name: Post welcome comment on: pull_request: types: [opened] -permissions: write-all +permissions: + pull-requests: write From 8a33ac9ab82b38c84e0152c2a3ad926badf97f5c Mon Sep 17 00:00:00 2001 From: Woman4Coding <12531583+Woman4Coding@users.noreply.github.com> Date: Fri, 20 Mar 2026 20:57:26 +0100 Subject: [PATCH 4/5] Add welcome job to pull request workflow --- .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 6a7123f077ef4b0aeecd89fca0f5e5c8491fc20c Mon Sep 17 00:00:00 2001 From: Woman4Coding <12531583+Woman4Coding@users.noreply.github.com> Date: Fri, 20 Mar 2026 20:59:52 +0100 Subject: [PATCH 5/5] Add step to post welcome comment on 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..3c514e5 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.event.pull_request.html_url }}