Skip to content

Commit c3dc662

Browse files
committed
Add new workflows to auto-comment on new issue and stale PRs
Signed-off-by: Du Tran <[email protected]>
1 parent b30ded7 commit c3dc662

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Reminder Comment on New Issues
2+
on:
3+
issues:
4+
types:
5+
- opened
6+
permissions:
7+
issues: write
8+
9+
jobs:
10+
label_issue:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repo (optional but avoids errors)
14+
uses: actions/checkout@v4
15+
16+
- name: Comment on the new issue
17+
env:
18+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
ISSUE_URL: ${{ github.event.issue.html_url }}
20+
ISSUE_NUMBER: ${{ github.event.issue.number }}
21+
run: |
22+
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. 🙏'

.github/workflows/stale.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Mark Stale PRs
2+
on:
3+
schedule:
4+
- cron: '30 1 * * *''
5+
permissions:
6+
pull-requests: write
7+
jobs:
8+
mark-stale-pr:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
issues: write
12+
pull-requests: write
13+
steps:
14+
- uses: actions/stale@v9
15+
with:
16+
days-before-issue-stale: -1
17+
days-before-issue-close: -1
18+
stale-pr-label: 'stale'
19+
stale-pr-message: 'This PR is stalled because it has been open for 30 days with no activity.'
20+
days-before-pr-stale: 30
21+
days-before-pr-close: -1
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+

0 commit comments

Comments
 (0)