From cb037c5748d0831df01f94e0be72cb147b3bc61c Mon Sep 17 00:00:00 2001 From: tobySolutions Date: Mon, 23 Oct 2023 20:54:16 +0100 Subject: [PATCH 1/2] chore: add new workflows --- .github/workflows/auto-response.yml | 37 +++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 16 +++++++++++++ .github/workflows/stale.yml | 18 ++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 .github/workflows/auto-response.yml create mode 100644 .github/workflows/labeler.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/auto-response.yml b/.github/workflows/auto-response.yml new file mode 100644 index 0000000000..f69d83a6f5 --- /dev/null +++ b/.github/workflows/auto-response.yml @@ -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', + }) \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000000..c18e71b059 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -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 }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000000..9945bcc4a0 --- /dev/null +++ b/.github/workflows/stale.yml @@ -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.' From 4b211feadfda38abbd51c978c208d02322f56110 Mon Sep 17 00:00:00 2001 From: tobySolutions Date: Mon, 23 Oct 2023 21:03:09 +0100 Subject: [PATCH 2/2] chore: add new workflows --- .github/{workflows => }/auto-response.yml | 0 .github/{workflows => }/labeler.yml | 0 .github/{workflows => }/stale.yml | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename .github/{workflows => }/auto-response.yml (100%) rename .github/{workflows => }/labeler.yml (100%) rename .github/{workflows => }/stale.yml (100%) diff --git a/.github/workflows/auto-response.yml b/.github/auto-response.yml similarity index 100% rename from .github/workflows/auto-response.yml rename to .github/auto-response.yml diff --git a/.github/workflows/labeler.yml b/.github/labeler.yml similarity index 100% rename from .github/workflows/labeler.yml rename to .github/labeler.yml diff --git a/.github/workflows/stale.yml b/.github/stale.yml similarity index 100% rename from .github/workflows/stale.yml rename to .github/stale.yml