From d1912e6c88ad2df0da98b9cb7e4b4b886ed707fe Mon Sep 17 00:00:00 2001 From: Vivek Vishal Date: Sun, 28 Jul 2024 23:42:30 +0530 Subject: [PATCH 1/3] [Action] To welcome first time contributor Signed-off-by: Vivek Vishal --- .github/workflows/first-time-contributor.yml | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/first-time-contributor.yml diff --git a/.github/workflows/first-time-contributor.yml b/.github/workflows/first-time-contributor.yml new file mode 100644 index 000000000000..9f67d2923bd2 --- /dev/null +++ b/.github/workflows/first-time-contributor.yml @@ -0,0 +1,39 @@ +name: First-Time Contributor Welcome + +on: + pull_request: + types: [opened] + +jobs: + welcome: + runs-on: ubuntu-latest + if: github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' + steps: + - name: Leave Welcome Comment + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: "Welcome, @${{ github.event.pull_request.user.login }}! Thank you for your first contribution! 🎉 A contributor will be by to give feedback soon. In the meantime, please review the [Newcomers' Guide](https://layer5.io/community/newcomers) and be sure to join the [community Slack](https://slack.layer5.io/). +

+ +

+ Be sure to double-check that you have signed your commits. + Here are instructions for [making signing an implicit activity while peforming a commit](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)." + }); + + - name: Label Pull Request (Optional) + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['first-time contributor'] + }); From ff47cb24282199c96fdb999b701295a423dc779e Mon Sep 17 00:00:00 2001 From: Vivek Vishal Date: Tue, 17 Sep 2024 18:16:37 +0530 Subject: [PATCH 2/3] Update first-time-contributor.yml Signed-off-by: Vivek Vishal --- .github/workflows/first-time-contributor.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/first-time-contributor.yml b/.github/workflows/first-time-contributor.yml index 9f67d2923bd2..78dd419d2852 100644 --- a/.github/workflows/first-time-contributor.yml +++ b/.github/workflows/first-time-contributor.yml @@ -1,9 +1,7 @@ name: First-Time Contributor Welcome - on: pull_request: types: [opened] - jobs: welcome: runs-on: ubuntu-latest @@ -14,18 +12,21 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | + const message = `Welcome, @${{ github.event.pull_request.user.login }}! Thank you for your first contribution! 🎉 A contributor will be by to give feedback soon. In the meantime, please review the [Newcomers' Guide](https://layer5.io/community/newcomers) and be sure to join the [community Slack](https://slack.layer5.io/). + +

+ +

+ + Be sure to double-check that you have signed your commits. + Here are instructions for [making signing an implicit activity while peforming a commit](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin).`; + github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: "Welcome, @${{ github.event.pull_request.user.login }}! Thank you for your first contribution! 🎉 A contributor will be by to give feedback soon. In the meantime, please review the [Newcomers' Guide](https://layer5.io/community/newcomers) and be sure to join the [community Slack](https://slack.layer5.io/). -

- -

- Be sure to double-check that you have signed your commits. - Here are instructions for [making signing an implicit activity while peforming a commit](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin)." + body: message }); - - name: Label Pull Request (Optional) uses: actions/github-script@v6 with: From e0861c713ab9cda87dd67fa4ff79cca6d21cb9c9 Mon Sep 17 00:00:00 2001 From: Vivek Vishal Date: Tue, 17 Sep 2024 18:36:45 +0530 Subject: [PATCH 3/3] Update .github/workflows/first-time-contributor.yml Signed-off-by: Vivek Vishal --- .github/workflows/first-time-contributor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/first-time-contributor.yml b/.github/workflows/first-time-contributor.yml index 78dd419d2852..d86ff5a5235d 100644 --- a/.github/workflows/first-time-contributor.yml +++ b/.github/workflows/first-time-contributor.yml @@ -19,7 +19,7 @@ jobs:

Be sure to double-check that you have signed your commits. - Here are instructions for [making signing an implicit activity while peforming a commit](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin).`; + Here are instructions for [making signing an implicit activity while performing a commit](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin).`; github.rest.issues.createComment({ issue_number: context.issue.number,