From bffa6cad22cb5a77d5c845a7e769eed6a301750c Mon Sep 17 00:00:00 2001 From: Sebastian Urchs Date: Thu, 21 Mar 2024 10:22:36 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20synced=20file(s)=20with=20neurob?= =?UTF-8?q?agel/workflows=20(#702)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔄 synced local '.github/workflows/' with remote 'template_workflows/project_automation/' Co-authored-by: surchs --- .github/workflows/handle_external_pr.yml | 24 ++++++++++++++++++++++++ .github/workflows/stale.yml | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/handle_external_pr.yml diff --git a/.github/workflows/handle_external_pr.yml b/.github/workflows/handle_external_pr.yml new file mode 100644 index 00000000..13c059d2 --- /dev/null +++ b/.github/workflows/handle_external_pr.yml @@ -0,0 +1,24 @@ +name: Label pull requests from forks + +on: + pull_request: + types: [opened] + +jobs: + handle_external_pr: + # Only run this entire workflow if the PR was opened from a forked repo + # The reasoning is that both bots and external contributors have to make + # a fork of the repo before they can open a PR because they don't have + # write access to the repo. + if: github.event.pull_request.head.repo.full_name != github.repository + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.NB_PROJECT_PAT }} + + steps: + - name: Add PR to project + run: | + gh pr edit ${{ github.event.pull_request.url }} --add-project Neurobagel + + - name: Label pull request with "_community" + run: gh pr edit ${{ github.event.pull_request.number }} --add-label "_community" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 4e94a9bc..58641275 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,7 +7,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: stale-issue-message: | We want to keep our issues up to date and active. This issue hasn't seen any activity in the last 75 days.