From 46636d88ae6e5f0d4107d9dc2a7da00324ec0898 Mon Sep 17 00:00:00 2001 From: Pavel Buchart Date: Mon, 29 Jan 2024 14:28:47 +0100 Subject: [PATCH 1/3] Add stale.yml distribution --- .github/workflows/distribute-stale.yml | 25 +++++++++++++++++++++++++ .github/workflows/stale.yml | 24 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/distribute-stale.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/distribute-stale.yml b/.github/workflows/distribute-stale.yml new file mode 100644 index 0000000..4328dcb --- /dev/null +++ b/.github/workflows/distribute-stale.yml @@ -0,0 +1,25 @@ +name: Add config for bumping/closing inactive PRs +on: + push: + branches: + - 'master' + paths: + - '.github/workflows/stale.yml' + - '.github/workflows/distribute-stale.yml' + +jobs: + replicate_changes: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: derberg/manage-files-in-multiple-repositories@v2 + with: + # TODO: using my personal token here. need a bot token + # needed scopes: repo, workflow + github_token: ${{ secrets.GLOBAL_GH_ACTION_TOKEN }} + # you must specify what pattern to include otherwise all files from the repository will be replicated + patterns_to_include: '.github/dependabot.yml' + commit_message: 'Update dependabot.yml config' + committer_username: 'Atlas Team' + committer_email: 'atlas@customink.com' + exclude_forked: true diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..f0c78b3 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,24 @@ +name: Bump/Close inactive PRs +on: + schedule: + - cron: "0 5 * * *" + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v5 + with: + days-before-pr-stale: 30 + days-before-pr-close: 90 + + stale-pr-label: "stale" + stale-pr-message: "This PR is open and inactive for 30 days. Merging PRs open for a long time is error-prone. Please proceed to merging or make a comment to keep it open. You can also prevent PRs from being tagged stale ot closed with 'keep-open' tag. If there is no activity in 90 days, this PR will be closed" + close-pr-message: "This PR was closed because it has been inactive for 90 days since being marked as stale." + + exempt-pr-labels: "keep-open,dependabot,dependencies" + + repo-token: ${{ secrets.GITHUB_TOKEN }} From 8130a3b1411aed3a5190b427df7f2025d54b4357 Mon Sep 17 00:00:00 2001 From: Pavel Buchart Date: Mon, 29 Jan 2024 15:23:55 +0100 Subject: [PATCH 2/3] Remove globaltest workflow --- .github/workflows/globaltest.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .github/workflows/globaltest.yml diff --git a/.github/workflows/globaltest.yml b/.github/workflows/globaltest.yml deleted file mode 100644 index e12b66a..0000000 --- a/.github/workflows/globaltest.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Global Test -on: - workflow_dispatch: - inputs: - repo_name: - description: Repositories to replicate dependabot config to - required: false - -jobs: - replicate_changes: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: derberg/manage-files-in-multiple-repositories@v2 - with: - # using my personal token here - # needed scopes: repo, workflow - github_token: ${{ secrets.GLOBAL_GH_ACTION_TOKEN }} - #you must specify what pattern to include otherwise all files from the repository will be replicated - patterns_to_include: '.github/dependabot.yml' - commit_message: 'Update dependabot.yml config' - committer_username: 'DX Team' - committer_email: 'dx@customink.com' - exclude_forked: true From 1b9e450bfda4258cf731b03cb13b730bf4603ce1 Mon Sep 17 00:00:00 2001 From: Pavel Buchart Date: Mon, 29 Jan 2024 15:25:00 +0100 Subject: [PATCH 3/3] Remove obsolete TODO and fix commit message --- .github/workflows/distribute-stale.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/distribute-stale.yml b/.github/workflows/distribute-stale.yml index 4328dcb..11bcfde 100644 --- a/.github/workflows/distribute-stale.yml +++ b/.github/workflows/distribute-stale.yml @@ -14,12 +14,11 @@ jobs: - uses: actions/checkout@v3 - uses: derberg/manage-files-in-multiple-repositories@v2 with: - # TODO: using my personal token here. need a bot token # needed scopes: repo, workflow github_token: ${{ secrets.GLOBAL_GH_ACTION_TOKEN }} # you must specify what pattern to include otherwise all files from the repository will be replicated patterns_to_include: '.github/dependabot.yml' - commit_message: 'Update dependabot.yml config' + commit_message: 'Update stale.yml config' committer_username: 'Atlas Team' committer_email: 'atlas@customink.com' exclude_forked: true