forked from vimistify/AmbuFlow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
1,789 additions
and
2,103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Auto Comment on PR Close | ||
|
||
on: | ||
pull_request_target: | ||
types: [closed] | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
comment-on-close: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Add Comment to Closed PR | ||
run: | | ||
COMMENT=$(cat <<EOF | ||
{ | ||
"body": "🚀 Thank you for your contribution! This pull request has been closed. If you have any questions or need further assistance, feel free to reach out." | ||
} | ||
EOF | ||
) | ||
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \ | ||
-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 "$COMMENT") | ||
cat response.json | ||
if [ "$RESPONSE" -ne 201 ]; then | ||
echo "Failed to add comment on PR close" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Auto Comment on PR Open | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened] | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
comment-on-open: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Add Comment to Opened PR | ||
run: | | ||
COMMENT=$(cat <<EOF | ||
{ | ||
"body": "👋 Thank you for opening this pull request! We're excited to review your contribution. Please give us a moment, and we'll get back to you shortly! \n\nFeel free to join our community on [Discord](https://discord.gg/9mZnkTRFFe) to discuss more!" | ||
} | ||
EOF | ||
) | ||
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \ | ||
-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 "$COMMENT") | ||
cat response.json | ||
if [ "$RESPONSE" -ne 201 ]; then | ||
echo "Failed to add comment on PR open" | ||
exit 1 | ||
fi | ||
- name: Add Reviewer to Pull Request | ||
run: | | ||
REVIEWERS=$(cat <<EOF | ||
{ | ||
"reviewers": ["mansiruhil13"] | ||
} | ||
EOF | ||
) | ||
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \ | ||
-X POST \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers \ | ||
-d "$REVIEWERS") | ||
cat response.json | ||
if [ "$RESPONSE" -ne 201 ]; then | ||
echo "Failed to add reviewer" | ||
exit 1 | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Auto Comment on Issue Close | ||
|
||
on: | ||
issues: | ||
types: [closed] | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
comment-on-close: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Add Comment to Closed Issue | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
COMMENT=$(cat <<EOF | ||
{ | ||
"body": "✅ This issue has been closed. Thank you for your contribution! If you have any further questions or issues, feel free to raise them, and we can discuss more!" | ||
} | ||
EOF | ||
) | ||
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \ | ||
-X POST \ | ||
-H "Authorization: token $GITHUB_TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments \ | ||
-d "$COMMENT") | ||
cat response.json | ||
if [ "$RESPONSE" -ne 201 ]; then | ||
echo "Failed to add comment on issue close" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Auto Comment on Issue Open | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
comment-on-issue: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Add Comment to Opened Issue | ||
run: | | ||
COMMENT=$(cat <<EOF | ||
{ | ||
"body": "🙌 Thank you for bringing this issue to our attention! We appreciate your input and will investigate it as soon as possible !" | ||
} | ||
EOF | ||
) | ||
RESPONSE=$(curl -s -o response.json -w "%{http_code}" \ | ||
-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 "$COMMENT") | ||
cat response.json | ||
if [ "$RESPONSE" -ne 201 ]; then | ||
echo "Failed to add comment on issue open" | ||
exit 1 | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
Oops, something went wrong.