Skip to content

Commit

Permalink
forget-from-test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dartvauder committed Nov 3, 2024
1 parent 302241e commit fe1f732
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
name: Greetings

on: [pull_request_target, issues]
on:
issues:
types: [opened]
pull_request_target:
types: [opened]

jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hello @${{ github.actor }}, 👋 Thank you for creating your first issue in our repository. We appreciate your contribution!"
pr-message: "Hello @${{ github.actor }}, 👋 Thank you for creating your first pull request in our repository. We appreciate your contribution!"
- name: Send greeting for issues
if: github.event_name == 'issues'
run: |
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \
-d '{"body": "Hello @${{ github.actor }}, 👋 Thank you for creating an issue in our repository. We appreciate your contribution!"}'
- name: Send greeting for pull requests
if: github.event_name == 'pull_request_target'
run: |
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
-d '{"body": "Hello @${{ github.actor }}, 👋 Thank you for creating a pull request in our repository. We appreciate your contribution!"}'
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Labeler
on: [pull_request_target]
on: [pull_request_target, issues]

jobs:
label:
Expand Down

0 comments on commit fe1f732

Please sign in to comment.