Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions for closing stale issues and pull request template #2708

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Pull Request Template

### Description

(You can include a summary of the changes and mention the related issue/s Or the relevant context.)

Moreover every contribution is precious and we would like to learn about you:
Can we return the favor? Are you like to contribute again? Would you like to be invited as member of the organisation?

### Fixing Closing issues

This pull request closes #ISSUE_NUMBER

### Type of change/s
(you can delete options that are not relevant.)

- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

### How Has This Been Tested?

- [ ] tested

In what browser/s?

### Checklist:

- [ ] 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

( Doesn't apply to this repo:
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
)


19 changes: 19 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Close Stale Issues"

on:
schedule:
- cron: "0 0 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Close stale issues
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
days-before-close: 7
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs."
close-issue-message: "This issue has been automatically closed because it has not had recent activity."
exempt-issue-labels: "pinned,security"
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,23 @@ Welcome to work! ("issues")
### https://github.com/code-charity/youtube/wiki/Contributing
you can also just check the (pinned-)issues(, readme & discussion, wiki, ..) <br><br>
### Thanks for caring ♥

## GitHub Actions Workflow for Closing Stale Issues

We have implemented a GitHub Actions workflow to automatically close stale issues. This helps in keeping the issue tracker clean and focused on active issues.

The workflow is defined in the `.github/workflows/stale.yml` file. It uses the `actions/stale@v4` action to automatically close issues that have been inactive for a specified period. The configuration is as follows:

- `days-before-stale`: 30 days
- `days-before-close`: 7 days
- Excludes issues with the `pinned` or `security` labels from being marked as stale

For more details, refer to the [GitHub documentation on closing inactive issues](https://docs.github.com/en/actions/use-cases-and-examples/project-management/closing-inactive-issues).

## Pull Request Template

We have added a pull request template to ensure that an issue is closed if a pull request is merged. This helps in keeping the issue tracker up-to-date with the latest changes.

The template is defined in the `.github/PULL_REQUEST_TEMPLATE/pull_request_template.md` file. It includes verbiage like "This pull request closes #ISSUE_NUMBER" to ensure that an issue is closed when the pull request is merged.

For more details, refer to the [GitHub documentation on using keywords in issues and pull requests](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests).