Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

πŸ”„ Synced file(s) with WordPress/openverse (#1080)

Dhruv Bhanushali77c8a92e3c15
diff --git a/.github/workflows/label_new_pr.yml b/.github/workflows/label_new_pr.yml
new file mode 100644
index 000000000..c0b97e01b
--- /dev/null
+++ b/.github/workflows/label_new_pr.yml
@@ -0,0 +1,27 @@
+name: Label new PR
+# ℹ️ https://github.com/WordPress/openverse/blob/main/.github/GITHUB.md#label-new-pr
+
+on:
+ pull_request:
+ types:
+ # Only set labels when the PR is created, this should fire `labeled`
+ # events that will trigger the checks defined in `pr_label_check.yml`.
+ - opened
+
+jobs:
+ set_label:
+ name: Set labels
+ runs-on: ubuntu-latest
+ steps:
+ - name: Trigger remote workflow
+ uses: felixp8/[email protected]
+ env:
+ PR_URL: ${{ github.event.pull_request.html_url }}
+ with:
+ owner: WordPress
+ repo: openverse
+ token: ${{ secrets.ACCESS_TOKEN }}
+ event_type: label_pr
+ client_payload: ${{ format('{{"pr_url":"{0}"}}', env.PR_URL) }}
+ wait_time: 5 # check every 5 seconds
+ max_time: 120 # timeout after 2 minutes
diff --git a/.github/workflows/pr_label_check.yml b/.github/workflows/pr_label_check.yml
index 9951bae5b..911a53fed 100644
--- a/.github/workflows/pr_label_check.yml
+++ b/.github/workflows/pr_label_check.yml
@@ -4,11 +4,8 @@ name: PR label check
on:
pull_request:
types:
- - opened
- - edited
- labeled
- unlabeled
- - synchronize
jobs:
check_aspect_label:
@@ -18,7 +15,7 @@ jobs:
- name: Check aspect label
uses: sugarshin/[email protected]
with:
- required_oneof: "πŸ’» aspect: code,πŸ“„ aspect: text,πŸ€– aspect: dx,πŸ•Ή aspect: interface,♿️ aspect: a11y"
+ required_oneof: "🚦 status: awaiting triage,πŸ’» aspect: code,πŸ“„ aspect: text,πŸ€– aspect: dx,πŸ•Ή aspect: interface,♿️ aspect: a11y"
check_goal_label:
name: Check goal label
@@ -27,7 +24,7 @@ jobs:
- name: Check goal label
uses: sugarshin/[email protected]
with:
- required_oneof: "🌟 goal: addition,πŸ›  goal: fix,✨ goal: improvement,🧰 goal: internal improvement"
+ required_oneof: "🚦 status: awaiting triage,🌟 goal: addition,πŸ›  goal: fix,✨ goal: improvement,🧰 goal: internal improvement"
check_priority_label:
name: Check priority label
@@ -36,4 +33,4 @@ jobs:
- name: Check priority label
uses: sugarshin/[email protected]
with:
- required_oneof: "🟩 priority: low,🟨 priority: medium,🟧 priority: high,πŸŸ₯ priority: critical"
+ required_oneof: "🚦 status: awaiting triage,🟩 priority: low,🟨 priority: medium,🟧 priority: high,πŸŸ₯ priority: critical"