Skip to content

Commit efb77b2

Browse files
committed
Updated
1 parent 73d11a4 commit efb77b2

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

.github/workflows/greetings.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,49 @@ on:
55
types: [opened]
66
pull_request_target:
77
types: [opened]
8+
89
permissions:
910
issues: write
1011
pull-requests: write
1112

1213
jobs:
1314
welcome:
1415
runs-on: ubuntu-latest
16+
1517
steps:
16-
- uses: actions/checkout@v1
17-
- uses: EddieHubCommunity/gh-action-community/src/welcome@main
18+
- name: Check out repository
19+
uses: actions/checkout@v2
20+
21+
- name: Greet first-time contributors
22+
id: greet
23+
uses: actions/first-interaction@v1
24+
with:
25+
repo-token: ${{ secrets.GITHUB_TOKEN }}
26+
issue-message: |
27+
Hi there! 👋 Thank you for opening your first issue on CodeHarborHub. We're excited to hear your thoughts and help you out. Please provide as much detail as you can so we can assist you effectively.
28+
pr-message: |
29+
Hi there! 👋 Thank you for submitting your first pull request to CodeHarborHub. We appreciate your contribution! Our team will review it soon. If you have any questions or need further assistance, feel free to reach out.
30+
31+
- name: Assign issue or pull request to team member
32+
if: github.event_name == 'issues' || github.event_name == 'pull_request_target'
33+
run: |
34+
ISSUE_NUMBER=${{ github.event.issue.number || github.event.pull_request.number }}
35+
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
36+
-d '{"assignees":["team-member"]}' \
37+
"https://api.github.com/repos/${{ github.repository }}/issues/${ISSUE_NUMBER}"
38+
39+
- name: Welcome message for community contributors
40+
if: github.event_name == 'issues' || github.event_name == 'pull_request_target'
41+
uses: EddieHubCommunity/gh-action-community/src/welcome@main
1842
with:
1943
github-token: ${{ secrets.GITHUB_TOKEN }}
2044
issue-message: "Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible."
2145
pr-message: "Great job, @${{ github.actor }}! 🎉 Thank you for submitting your pull request to CodeHarborHub. We appreciate your contribution! Our team will review it soon. If you have any questions or need further assistance, feel free to reach out."
22-
23-
46+
47+
- name: Label first-time contributions
48+
if: github.event_name == 'issues' || github.event_name == 'pull_request_target'
49+
run: |
50+
ISSUE_NUMBER=${{ github.event.issue.number || github.event.pull_request.number }}
51+
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
52+
-d '{"labels":["first-time contribution"]}' \
53+
"https://api.github.com/repos/${{ github.repository }}/issues/${ISSUE_NUMBER}"

0 commit comments

Comments
 (0)