-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Issue Template & workflow & contribution Guideline
- Loading branch information
1 parent
3c0b9c6
commit 88dcd50
Showing
21 changed files
with
740 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,3 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [Nishitbaria] |
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,32 @@ | ||
name: 🐞 Bug | ||
description: Report an issue to help us improve the project. | ||
title: "[BUG] <write a small description here>" | ||
labels: ["bug", "goal: fix", "priority: medium"] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Description | ||
description: A brief description of the issue or bug you are facing, also include what you tried and what didn't work. | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Screenshots | ||
description: Please add screenshots if applicable | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Any additional information? | ||
description: Any additional information or Is there anything we should know about this bug? | ||
validations: | ||
required: false | ||
- type: dropdown | ||
attributes: | ||
label: What browser are you seeing the problem on? | ||
multiple: true | ||
options: | ||
- Firefox | ||
- Chrome | ||
- Safari | ||
- Microsoft Edge |
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,41 @@ | ||
name: "Documentation 📋" | ||
description: "Use this form to present your suggestions on how to improve our docs" | ||
title: "[DOCS] <write your suggestion here>" | ||
labels: ["documenation", "goal: enhancement"] | ||
|
||
body: | ||
- type: textarea | ||
id: docs_description | ||
attributes: | ||
label: "Issue Description" | ||
description: "Please provide a brief summary of the documentation issue you are experiencing or would like to address." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: screenshots_examples_docs | ||
attributes: | ||
label: "Screenshots or Examples (if applicable)" | ||
description: "Please include relevant screenshots or examples to help illustrate the problem." | ||
|
||
- type: textarea | ||
id: proposed_solution_docs | ||
attributes: | ||
label: "Proposed Solution (optional)" | ||
description: "If you have a proposed solution for the documentation issue, please provide it here. This can be helpful for speeding up the resolution process." | ||
|
||
- type: checkboxes | ||
id: terms_checklist_docs | ||
attributes: | ||
label: "Checklist" | ||
description: "By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/Nishitbaria/OpenGrame/blob/main/CODE_OF_CONDUCT.md)" | ||
options: | ||
- label: "I have checked the existing [issues](https://github.com/Nishitbaria/OpenGrame/issues)" | ||
required: true | ||
- label: "I have read the [Contributing Guidelines](https://github.com/Nishitbaria/OpenGrame/blob/main/CONTRIBUTING.md)" | ||
required: true | ||
- label: "I am willing to work on this issue (optional)" | ||
required: false | ||
- type: markdown | ||
attributes: | ||
value: "Thank you for taking the time to raise this issue! Your input is greatly appreciated." |
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,32 @@ | ||
name: Feature Request 💡 | ||
description: Have any new idea or new feature for LinksHub? Please suggest! | ||
title: "[Feature] <write a small description here>" | ||
labels: ["enhancement", "goal: addition", "priority: high"] | ||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
description: A clear and concise description of any alternative solution or features you've considered. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: screenshots | ||
attributes: | ||
label: Screenshots | ||
description: Please add screenshots if applicable | ||
validations: | ||
required: false | ||
- type: checkboxes | ||
id: no-duplicate-issues | ||
attributes: | ||
label: "Checklist" | ||
options: | ||
- label: "I have checked the existing issues" | ||
required: true | ||
|
||
- label: "I have read the [Contributing Guidelines](https://github.com/Nishitbaria/OpenGrame/blob/main/CONTRIBUTING.md)" | ||
required: true | ||
|
||
- label: "I am willing to work on this issue (optional)" | ||
required: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Other | ||
description: Use this for any other question or issue. Please do not create blank issues | ||
title: "[OTHER]" | ||
labels: ["status: awaiting triage"] | ||
body: | ||
- type: textarea | ||
id: issuedescription | ||
attributes: | ||
label: What would you like to share or ask? | ||
description: Provide a clear and concise explanation of your issue. | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
id: no-duplicate-issues | ||
attributes: | ||
label: "Checklist" | ||
options: | ||
- label: "I have checked the existing issues" | ||
required: true | ||
|
||
- label: "I have read the [Contributing Guidelines](https://github.com/Nishitbaria/OpenGrame/blob/main/CONTRIBUTING.md)" | ||
required: true | ||
|
||
- label: "I am willing to work on this issue (optional)" | ||
required: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Refactor Code 🔧 | ||
description: Use this label for code refactoring tasks. | ||
title: "[Refactor] <write what you want to add>" | ||
labels: ["goal: refactor", "priority: medium"] | ||
body: | ||
- type: input | ||
attributes: | ||
label: File Name | ||
description: "Enter the file that you want to refactor in the codebase." | ||
placeholder: "For example - component/Cards/Card.tsx" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: refactor_description | ||
attributes: | ||
label: "Reason for Refactoring the Code" | ||
description: "Describe what improvements can be made in the codebase without introducing breaking changes." | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
id: no-duplicate-issues | ||
attributes: | ||
label: "Checklist" | ||
options: | ||
- label: "I have checked the existing [issues](https://github.com/Nishitbaria/OpenGrame/issues)." | ||
required: true | ||
|
||
- label: "I have read the [Contributing Guidelines](https://github.com/Nishitbaria/OpenGrame/blob/main/CONTRIBUTING.md)." | ||
required: true | ||
|
||
- label: "The changes don't break the code and don't introduce new functionality." | ||
required: true | ||
|
||
- label: "I am willing to work on this issue (optional)." | ||
required: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
updates: | ||
# Update GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
labels: | ||
- 📦 dependencies | ||
directory: "/" # refers to the location of package.json | ||
commit-message: | ||
prefix: "chore(deps)" | ||
schedule: | ||
interval: "daily" |
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,19 @@ | ||
<!-- If your PR fixes an open issue, use `Closes #999` to link your PR with the issue. #999 stands for the issue number you are fixing --> | ||
|
||
## Fixes Issue | ||
|
||
<!-- Remove this section if not applicable --> | ||
|
||
<!-- Example: Closes #31 --> | ||
|
||
## Changes proposed | ||
|
||
<!-- List all the proposed changes in your PR --> | ||
|
||
## Screenshots | ||
|
||
<!-- Add all the screenshots which support your changes --> | ||
|
||
## Note to reviewers | ||
|
||
<!-- Add notes to reviewers if applicable --> |
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-template: "v$RESOLVED_VERSION" | ||
tag-template: "v$RESOLVED_VERSION" | ||
categories: | ||
- title: "🚧 Huge Updates" | ||
labels: | ||
- "📈 Major" | ||
- title: "🚀 New Features" | ||
labels: | ||
- "feature" | ||
- title: "🐛 Bug Fixes" | ||
labels: | ||
- "patch" | ||
- "📄 aspect: docs" | ||
- title: "🧰 Maintenance" | ||
labels: | ||
- "chore" | ||
- "dependencies" | ||
change-template: "- $TITLE @$AUTHOR (#$NUMBER)" | ||
change-title-escapes: '\<*_&' | ||
version-resolver: | ||
major: | ||
labels: | ||
- "📈 Major" | ||
minor: | ||
labels: | ||
- "feature" | ||
patch: | ||
labels: | ||
- "patch" | ||
- "dependencies" | ||
- "📄 aspect: docs" | ||
default: patch | ||
template: | | ||
$CHANGES |
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,24 @@ | ||
# reference: https://github.com/hoho4190/issue-pr-labeler | ||
name: PR Labeler | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- reopened | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read # to read configuration yml file | ||
pull-requests: write # to add labels to pull requests | ||
|
||
steps: | ||
- name: Run PR Labeler | ||
uses: hoho4190/issue-pr-labeler@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
config-file-name: labeler-config.yml | ||
# disable-bot: true # this will prevent issues, PRs created by bots |
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,16 @@ | ||
name: "Author Assign" | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, reopened] | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
assign-author: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: toshimaru/[email protected] | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" # GITHUB_TOKEN will be used by default |
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 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" | ||
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,47 @@ | ||
name: Close PRs Without Linked Issues | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
close_prs_without_issue: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check and Close PRs Without Linked Issues | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # This ensures that git history is fully fetched for proper processing | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Close PRs Without Linked Issues | ||
run: | | ||
const daysThreshold = 30; | ||
const github = require('@actions/github'); | ||
const octokit = new github.GitHub(process.env.GITHUB_TOKEN); | ||
const owner = github.context.repo.owner; | ||
const repo = github.context.repo.repo; | ||
const { data: pullRequests } = await octokit.pulls.list({ owner, repo, state: 'open' }); | ||
for (const pr of pullRequests) { | ||
const { data: issues } = await octokit.issues.listForRepo({ owner, repo, per_page: 100 }); | ||
const linkedIssue = issues.find(issue => | ||
issue.pull_request && issue.pull_request.url === pr.url | ||
); | ||
if (!linkedIssue) { | ||
await octokit.pulls.update({ owner, repo, pull_number: pr.number, state: 'closed' }); | ||
await octokit.issues.createComment({ | ||
owner, | ||
repo, | ||
issue_number: pr.number, | ||
body: "This pull request has been closed because it does not mention the issue that it solves. Please refer to the [Contributing files](https://github.com/rupali-codes/LinksHub/blob/main/CONTRIBUTING.md#issues) to help you add this information. Then, tag the maintainers so your PR can be reopened." | ||
}); | ||
} | ||
} |
Oops, something went wrong.