-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
75 changed files
with
3,463 additions
and
362 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 |
---|---|---|
|
@@ -4,3 +4,4 @@ GOOGLE_SECRET= | |
GITHUB_ID= | ||
GITHUB_SECRET= | ||
NEXTAUTH_SECRET= | ||
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,30 @@ | ||
- name: Auto assign PR | ||
# You may pin to the exact commit or the version. | ||
# uses: li-sumup/actions-assigner@964e42cd4fe645e3ea169ce3887db85e8bb128c3 | ||
uses: li-sumup/actions-assigner@v1.0.2 | ||
with: | ||
# GitHub token | ||
token: # optional, default is ${{ github.token }} | ||
|
||
name: Assign Issue to Self | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
permissions: | ||
issues: write # Ensure the workflow has write permissions for issues | ||
|
||
jobs: | ||
assign: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Assign issue to commenter if they comment "self" | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const issueNumber = context.issue.number; | ||
const commentBody = context.payload.comment.body.trim().toLowerCase(); | ||
const commenter = context.payload.comment.user.login; | ||
if (commentBody === 'self') { | ||
await github.rest.issues.addAssignees({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: issueNumber, | ||
assignees: [commenter] | ||
}); | ||
} |
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! 🎉 We'll look into it as soon as possible. In the meantime, if you would like to assign this issue to yourself, please comment with the word "self" and the issue will be assigned to you. Your contributions are highly appreciated! 😊\n\nYou can also check our [CONTRIBUTING.md](https://github.com/Sayak-Bhunia/mystory/blob/main/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](https://github.com/Sayak-Bhunia/mystory/blob/main/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,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 30 ]; 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 30 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 |
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: Close Stale PRs | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Runs daily at midnight | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
permissions: | ||
pull-requests: write | ||
issues: write | ||
|
||
jobs: | ||
close_stale_prs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/stale@v7 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-pr-message: 'This PR has been automatically closed due to inactivity from the owner for 15 days.' | ||
days-before-pr-stale: 15 | ||
days-before-pr-close: 0 | ||
exempt-pr-author: false | ||
exempt-pr-labels: '' | ||
only-labels: '' | ||
operations-per-run: 30 | ||
remove-stale-when-updated: true | ||
debug-only: false |
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
Oops, something went wrong.