Skip to content
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
22 changes: 22 additions & 0 deletions .github/workflows/reminder-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Reminder Comment on New Issues

Check failure on line 1 in .github/workflows/reminder-comment.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

1:1 [document-start] missing document start "---"
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. 🙏'

Check failure on line 22 in .github/workflows/reminder-comment.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

22:304 [new-line-at-end-of-file] no new line character at the end of file
Copy link
Member

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?

Copy link
Author

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.

23 changes: 23 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Mark Stale PRs

Check failure on line 1 in .github/workflows/stale.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

1:1 [document-start] missing document start "---"
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'

Check failure on line 18 in .github/workflows/stale.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

18:28 syntax error: expected <block end>, but found '<scalar>' (syntax)
stale-pr-message: 'This PR is stalled because it has been open for 30 days with no activity.'
Copy link
Member

Choose a reason for hiding this comment

The 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?

Copy link
Author

@quangdutran quangdutran Apr 27, 2025

Choose a reason for hiding this comment

The 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.

Copy link
Author

Choose a reason for hiding this comment

The 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 }}

Check failure on line 23 in .github/workflows/stale.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

23:1 [empty-lines] too many blank lines (1 > 0)
Loading