-
Notifications
You must be signed in to change notification settings - Fork 312
Add workflows to comment on new issue created and mark stale issues #5451
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Reminder Comment on New Issues | ||
on: | ||
issues: | ||
types: | ||
- opened | ||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
label_issue: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo (optional but avoids errors) | ||
uses: actions/checkout@v4 | ||
|
||
- name: Comment on the new issue | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ISSUE_URL: ${{ github.event.issue.html_url }} | ||
ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
run: | | ||
gh issue comment "$ISSUE_NUMBER" --body $'**Thanks for opening this issue.**\n\nYou can help us to fix this issue faster by opening a pull request. See our [Contribution Guide](https://github.com/opensearch-project/.github/blob/main/CONTRIBUTING.md) if this is your first time contributing. 🙏' | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Mark Stale PRs | ||
on: | ||
schedule: | ||
- cron: '30 1 * * *'' | ||
permissions: | ||
pull-requests: write | ||
jobs: | ||
mark-stale-pr: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
days-before-issue-stale: -1 | ||
days-before-issue-close: -1 | ||
stale-pr-label: 'stale' | ||
stale-pr-message: 'This PR is stalled because it has been open for 30 days with no activity.' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the default behavior of this action is to close PR that is 30 days old with this msg? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is stated here that the value -1 means PR won't be closed. I will check this again and confirm. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @peterzhuamazon the PR won't be closed as I test on my own repo |
||
days-before-pr-stale: 30 | ||
days-before-pr-close: -1 | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without defining explicit permissions, does the default GITHUB_TOKEN have such permissions to comment on issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this repo, it is needed I guess, I missed that.