-
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.
Actions: comments & stale management (#466)
Updated stale workflow to include PRs Upgraded assignee issue comment with markdown using github/script New first interaction workflow for contributors who open PRs without being assigned issues
- Loading branch information
1 parent
2c7ea2e
commit d84097b
Showing
5 changed files
with
94 additions
and
58 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,16 @@ | ||
# This workflow comments on PRs opened by first time contributors. | ||
# Reminds first timer contributors to associate their PR with an issue and follow the guidelines. | ||
# See for more info: https://github.com/actions/first-interaction | ||
|
||
name: First Interaction PR Comment | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
greeting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/first-interaction@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
pr-message: "First time contributors to Chayn: Please make sure that this PR is linked to an issue you are assigned! We will not merge contributor PRs without a linked assigned issue. Please ask to be assigned an existing issue or create your own before opening a PR. Read our Contributing Guidelines in the CONTRIBUTING.md file for more details. Thank you for your contribution!" |
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 @@ | ||
# This workflow handles issue comments. | ||
|
||
name: Issue Assignee Comment | ||
|
||
on: | ||
issues: | ||
types: | ||
- assigned | ||
- labeled | ||
|
||
jobs: | ||
# When issues are assigned, a comment is posted | ||
# Tags the assignee with links to helpful resources | ||
# See for more info: https://github.com/actions/github-script | ||
assigned-comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Post assignee issue comment | ||
id: assigned-comment | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.payload.issue.number, | ||
body: `Thank you @${context.payload.issue.assignee.login} you have been assigned this issue! | ||
**Please follow the directions in our [Contributing Guide](https://github.com/chaynHQ/.github/blob/main/docs/CONTRIBUTING.md). We look forward to reviewing your pull request shortly ✨** | ||
--- | ||
Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you! | ||
Learn more about Chayn [here](https://linktr.ee/chayn) and [explore our projects](https://org.chayn.co/projects). 🌸` | ||
}) |
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,43 @@ | ||
# This workflow labels stale issues and PRs after 30 days of inactivity. | ||
# Stale PRs are closed after 1 week of inactivity after labeled stale. | ||
# See for more info: https://github.com/actions/stale | ||
|
||
name: Mark Stale Contributions | ||
|
||
on: | ||
# Enable manual run from the Actions tab so workflow can be run at any time | ||
workflow_dispatch: | ||
# Scheduled to run at 12:00 on every Monday | ||
schedule: | ||
- cron: "0 0 * * MON" | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-label: "stale" | ||
days-before-stale: 30 | ||
# disables closing issues | ||
days-before-issue-close: -1 | ||
# close pr after 1 week no updates after stale warning | ||
days-before-pr-close: 7 | ||
# only scan assigned issues | ||
include-only-assigned: true | ||
# ignore issues assigned to staff and bots | ||
exempt-assignees: "kyleecodes, swetha-charles, eleanorreem, annarhughes, tarebyte, dependabot[bot], dependabot, github-actions[bot], github-actions" | ||
# disable removing stale label due to irrelevant activity (like branch updates) | ||
remove-stale-when-updated: false | ||
# exempt dependabot prs from going stale | ||
exempt-pr-labels: dependencies | ||
# disable counting irrelevant activity (branch updates) towards day counter on prs. | ||
ignore-pr-updates: true | ||
stale-pr-message: "As per Chayn policy, after 30 days of inactivity, we will close this PR." | ||
close-pr-message: "This PR has been closed due to inactivity." | ||
stale-issue-message: "As per Chayn policy, after 30 days of inactivity, we will be unassigning this issue. Please comment to stay assigned." |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.