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

chore: add new workflows #780

Merged
merged 2 commits into from
Oct 25, 2023
Merged
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
37 changes: 37 additions & 0 deletions .github/auto-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Automated Responses

on:
issues:
types: [opened]
pull_request:
types: [opened]

jobs:
respond:
runs-on: ubuntu-latest
steps:
- name: Comment on new issue
if: github.event_name == 'issues'
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Thanks for opening this issue! A maintainer will review it soon.',
})
- name: Comment on new pull request
if: github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.pulls.createReview({
pull_number: context.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Thanks for opening this pull request! A maintainer will review it soon.',
event: 'COMMENT',
})
16 changes: 16 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Auto Labeling

on:
issues:
types: [opened, labeled, unlabeled]
pull_request:
types: [opened, labeled, unlabeled]

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label issues and pull requests
uses: actions/labeler@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Stale Issues and PRs

on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Close stale issues and pull requests
uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 15
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 within the next 7 days.'
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.'