From 1a1c204dd5ad1973ca36deb24042373a9af413ed Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Fri, 22 Mar 2024 09:48:11 -0500 Subject: [PATCH 1/2] add calling workflow --- .github/workflows/community-label.yml | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/community-label.yml diff --git a/.github/workflows/community-label.yml b/.github/workflows/community-label.yml new file mode 100644 index 00000000000..5b315feef2c --- /dev/null +++ b/.github/workflows/community-label.yml @@ -0,0 +1,37 @@ +# **what?** +# Label a PR with a `community` label when a PR is opened by a user outside core/adapters + +# **why?** +# To streamline triage and ensure that community contributions are recognized and prioritized + +# **when?** +# When a PR is opened, not in draft or moved from draft to ready for review + + +name: Label community PRs + +on: + pull_request: + types: [opened, ready_for_review] + +defaults: + run: + shell: bash + +permissions: + pull-requests: write # labels PRs + +jobs: + open_issues: + # If this PR already has the community label, no need to relabel it + # If this PR is opened and not draft, determine if it needs to be labeled + # if the PR is converted out of draft, determine if it needs to be labeled + if: | + (!contains(github.event.pull_request.labels.*.name, 'community') && + (github.event.action == 'opened' && github.event.pull_request.draft == false ) || + github.event.action == 'ready_for_review' ) + uses: dbt-labs/actions/.github/workflows/label-community.yml@main + with: + github_team: "core" + label: 'community' + secrets: inherit From fce7263bfb5b6d6ff9568543b5c9bac1bd5af8f5 Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Fri, 22 Mar 2024 10:03:39 -0500 Subject: [PATCH 2/2] make quotes consistant --- .github/workflows/community-label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/community-label.yml b/.github/workflows/community-label.yml index 5b315feef2c..adaf2b4a2ab 100644 --- a/.github/workflows/community-label.yml +++ b/.github/workflows/community-label.yml @@ -32,6 +32,6 @@ jobs: github.event.action == 'ready_for_review' ) uses: dbt-labs/actions/.github/workflows/label-community.yml@main with: - github_team: "core" + github_team: 'core' label: 'community' secrets: inherit