From 4e9cfaddeab95bbd6a60a4907298c015680fffd4 Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean Date: Sat, 11 May 2024 08:34:06 +0700 Subject: [PATCH 1/3] chore: make greetings on PR First-time Contrib --- .github/workflows/greetings.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/greetings.yml diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 000000000000..73abe8e4bfaa --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,32 @@ +name: Greetings + +on: [pull_request_target] + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + pr-message: | + Thank you for sending this PR! + + We expect the following in all Pull Requests (PRs). + - PRs must be sent to the [appropriate branch](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#branching) + - All git commits must be [GPG-signed](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#signing) + - Must follow our [style guide](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#php-style) + - Be [commented](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#comments) in the PHP source file + - Be documented in the [user guide](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#user-guide) + - Be [unit tested](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#unit-testing) + - Pass all checks in GitHub Actions + + > [!IMPORTANT] + > We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works. + + If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work on the framework than you do. Please make it as painless for your contributions to be included as possible. + + See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md From 4ba0ebbb02fe3638fb4d09bdf1c1b7b56e932539 Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean Date: Sat, 11 May 2024 08:37:42 +0700 Subject: [PATCH 2/3] fix: only need pull-requests --- .github/workflows/greetings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 73abe8e4bfaa..cdc78fa8966a 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -6,7 +6,7 @@ jobs: greeting: runs-on: ubuntu-latest permissions: - issues: write + issues: read pull-requests: write steps: - uses: actions/first-interaction@v1 From 5696cbc415016a86100437b0f35e0e97502aa491 Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean <97607754+ddevsr@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:19:57 +0700 Subject: [PATCH 3/3] Update greetings.yml --- .github/workflows/greetings.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index cdc78fa8966a..93929abf9247 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -1,6 +1,6 @@ name: Greetings -on: [pull_request_target] +on: [pull_request] jobs: greeting: @@ -8,6 +8,7 @@ jobs: permissions: issues: read pull-requests: write + if: github.repository == 'codeigniter4/CodeIgniter4' steps: - uses: actions/first-interaction@v1 with: