-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from anuragverma108/main
added bots
- Loading branch information
Showing
13 changed files
with
369 additions
and
0 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,26 @@ | ||
name: "🐞 Bug Report" | ||
description: "Create a report to help us improve" | ||
title: "BUG:" | ||
labels: ["Bug"] | ||
body: | ||
- type: checkboxes | ||
attributes: | ||
label: "Is there an existing issue for this?" | ||
description: "Please search to see if an issue already exists for the bug you encountered." | ||
options: | ||
- label: "I have searched the existing issues" | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: "What happened?" | ||
description: "A concise description of what you're experiencing." | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
attributes: | ||
label: "Record" | ||
options: | ||
- label: "I agree to follow this project's Code of Conduct" | ||
required: true | ||
- label: "I'm a GSSOC'24 contributor" | ||
- label: "I want to work on this issue" |
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,26 @@ | ||
name: "📑 Documentation Update" | ||
description: "Improve Documentation" | ||
title: "DOC:" | ||
labels: [DOC, Needs Triage] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: "What's wrong with the existing documentation" | ||
description: "Which things do we need to add or delete" | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: "Add ScreenShots" | ||
description: "Add sufficient SS to explain your issue." | ||
validations: | ||
required: false | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: "Record" | ||
options: | ||
- label: "I agree to follow this project's Code of Conduct" | ||
required: true | ||
- label: "I'm a GSSOC'24 contributor" | ||
- label: "I want to work on this issue" |
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,25 @@ | ||
name: "✨ Feature Request" | ||
description: "Suggest an idea for this project " | ||
title: "Feat:" | ||
labels: [Feat, Needs Triage] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: "Describe the feature" | ||
description: | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: "Add ScreenShots" | ||
description: "Add sufficient SS to explain your issue." | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
attributes: | ||
label: "Record" | ||
options: | ||
- label: "I agree to follow this project's Code of Conduct" | ||
required: true | ||
- label: "I'm a GSSOC'24 contributor" | ||
- label: "I want to work on this issue" |
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,38 @@ | ||
# Related Issue | ||
|
||
[Cite any related issue(s) this pull request addresses. If none, simply state “None”] | ||
|
||
Fixes: #(issue no.) | ||
|
||
# Description | ||
|
||
[Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.] | ||
|
||
<!---give the issue number you fixed-----> | ||
|
||
# Type of PR | ||
|
||
- [ ] Bug fix | ||
- [ ] Feature enhancement | ||
- [ ] Documentation update | ||
- [ ] Other (specify): _______________ | ||
|
||
# Screenshots / videos (if applicable) | ||
[Attach any relevant screenshots or videos demonstrating the changes. Make sure to attach before & after screenshots in your PR.] | ||
|
||
# Checklist: | ||
|
||
<!-- | ||
----Please delete options that are not relevant. And in order to tick the check box just put x inside them for example [x] like | ||
--> | ||
|
||
- [ ] I have made this change from my own. | ||
- [ ] I have taken help from some online resources. | ||
- [ ] My code follows the style guidelines of this project. | ||
- [ ] I have performed a self-review of my own code. | ||
- [ ] I have commented my code, particularly in hard-to-understand areas. | ||
- [ ] I have made corresponding changes to the documentation. | ||
- [ ] My changes generate no new warnings. | ||
- [ ] I have tested the changes thoroughly before submitting this pull request. | ||
- [ ] I have provided relevant issue numbers and screenshots after making the changes. | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,17 @@ | ||
name: Issue Assignment | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
auto-assign: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: 'Auto-assign issue creator' | ||
uses: pozil/auto-assign-issue@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} # Required token for authentication | ||
assignees: ${{ github.event.issue.user.login }} # Auto-assign the issue creator |
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,29 @@ | ||
name: Comment on Issue Close | ||
|
||
on: | ||
issues: | ||
types: [closed] | ||
|
||
jobs: | ||
greet-on-close: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Greet User | ||
uses: actions/github-script@v5 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const issue = context.payload.issue; | ||
const issueCreator = issue.user.login; | ||
const issueNumber = issue.number; | ||
const greetingMessage = `Hello @${issueCreator}! Your issue #${issueNumber} has been closed. Thank you for your contribution!`; | ||
github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: issueNumber, | ||
body: greetingMessage | ||
}); |
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 | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Add Comment to Issue | ||
run: | | ||
COMMENT=$(cat <<EOF | ||
{ | ||
"body": "Thank you for creating this issue! 🎉 Your issue will soon be reviewed by either the PA or a mentor. Please note that Level 1 is temporary and can be changed during the review. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊\n\n You can also check our CONTRIBUTING.md for guidelines on contributing to this project. " | ||
} | ||
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" | ||
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,36 @@ | ||
name: Auto Comment on PR Merge | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
if: github.event.pull_request.merged == true | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Add Comment to Issue | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
COMMENT=$(cat <<EOF | ||
{ | ||
"body": "🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀" | ||
} | ||
EOF | ||
) | ||
curl -X POST \ | ||
-H "Authorization: Bearer $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" |
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,37 @@ | ||
name: Auto Comment on PR | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened] | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- name: Add Comment to Pull Request | ||
run: | | ||
COMMENT=$(cat <<EOF | ||
{ | ||
"body": "Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our contributing.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊" | ||
} | ||
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" | ||
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,36 @@ | ||
name: Auto Comment on Issue To Wait | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Add Comment to Issue | ||
run: | | ||
COMMENT=$(cat <<EOF | ||
{ | ||
"body": "Thanks for creating the issue in BuddyTrail!\nBefore you start working on your PR, please make sure to:\n - ⭐ Star the repository if you haven't already.\n - Pull the latest changes to avoid any merge conflicts.\n - Attach before & after screenshots in your PR for clarity.\n- Include the issue number in your PR description for better tracking.\n Don't forget to follow @PriyaGhosal – Project Admin – for more updates!\n\n We're excited to see your contribution as part of GSSOC Extended Edition 2024 and Hacktoberfest! 🎉 \n Happy open-source contributing!" | ||
} | ||
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" | ||
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,26 @@ | ||
name: Auto Label Issues | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
label: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Add Labels to Issues | ||
if: github.event_name == 'issues' | ||
uses: actions-ecosystem/action-add-labels@v1.1.1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
labels: | | ||
gssoc-ext | ||
hacktoberfest-accepted | ||
level1 |
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,37 @@ | ||
name: Close Old Issues | ||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
close-issues: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Close Old Issues | ||
run: | | ||
open_issues=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
"https://api.github.com/repos/${{ github.repository }}/issues?state=open" \ | ||
| jq -r '.[] | .number') | ||
for issue in $open_issues; do | ||
# Get the last updated timestamp of the issue | ||
last_updated=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
"https://api.github.com/repos/${{ github.repository }}/issues/$issue" \ | ||
| jq -r '.updated_at') | ||
days_since_update=$(( ( $(date +%s) - $(date -d "$last_updated" +%s) ) / 86400 )) | ||
if [ $days_since_update -gt 10 ]; then | ||
curl -s -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-d '{"state":"closed"}' \ | ||
"https://api.github.com/repos/${{ github.repository }}/issues/$issue" | ||
# Add a comment explaining when the issue will be closed | ||
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-d '{"body":"This issue has been automatically closed because it has been inactive for more than 10 days. If you believe this is still relevant, feel free to reopen it or create a new one. Thank you!"}' \ | ||
"https://api.github.com/repos/${{ github.repository }}/issues/$issue/comments" | ||
fi | ||
done |