Skip to content

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

Centrally sync release drafter configuration (#132)

Dhruv Bhanushali3beb6260bf11
diff --git a/.github/GITHUB.md b/.github/GITHUB.md
index f17586b8e..168caad1d 100644
--- a/.github/GITHUB.md
+++ b/.github/GITHUB.md
@@ -21,6 +21,44 @@ at 15:00 UTC every Tuesday.
**Cron:** [at 15:15 on Tuesday](https://crontab.guru/#15_15_*_*_2)
+### Label sync
+
+This workflow ensures that all repos associated with the project have the
+minimum set of consistent labels. It creates missing labels, and updates the
+color and description where they do not match the standard values.
+
+**Cron:** [at 00:00](https://crontab.guru/#0_0_*_*_*)
+**Dispatch:** enabled
+
+### Weekly updates
+
+This workflow creates and publishes a post on the Make Openverse site once a
+week, outlining the closed issues and merged PRs of the preceding week.
+
+**Cron:** [at 00:01 on Monday](https://crontab.guru/#1_0_*_*_1)
+**Dispatch:** enabled
+
+### New discussion notification
+
+This workflow makes a `POST` request to the Slack webhook when a new
+discussion is created, sending a notification message to the
+`#openverse-notifications` channel.
+
+**Discussion:** created
+
+### Meta file sync
+
+This workflow ensures that the files specified in [`sync.yml`](sync.yml) are
+synchronised across all Openverse repos. Treating this repo as the source of
+truth, it creates PRs to resolve any differences.
+
+**Cron:** [at 00:00](https://crontab.guru/#0_0_*_*_*)
+**Push:** Branch `main`
+**Dispatch:** enabled
+**Config:** `.github/sync.yml`
+
+## Synced workflows
+
### New issue automation
This workflow adds issues to the "Backlog" column in the Openverse project as
@@ -45,33 +83,6 @@ This workflow ensures that all PRs have one label from each of the groups
**PR:** opened, edited, labeled, unlabeled, synchronize
**Dispatch:** disabled
-### Label sync
-
-This workflow ensures that all repos associated with the project have the
-minimum set of consistent labels. It creates missing labels, and updates the
-color and description where they do not match the standard values.
-
-**Cron:** [at 00:00](https://crontab.guru/#0_0_*_*_*)
-**Dispatch:** enabled
-
-### Meta file sync
-
-This workflow ensures that the files specified in [`sync.yml`](sync.yml) are
-synchronised across all Openverse repos. Treating this repo as the source of
-truth, it creates PRs to resolve any differences.
-
-**Cron:** [at 00:00](https://crontab.guru/#0_0_*_*_*)
-**Push:** Branch `main`
-**Dispatch:** enabled
-
-### Weekly updates
-
-This workflow creates and publishes a post on the Make Openverse site once a
-week, outlining the closed issues and merged PRs of the preceding week.
-
-**Cron:** [at 00:01 on Monday](https://crontab.guru/#1_0_*_*_1)
-**Dispatch:** enabled
-
### New PR notification
This workflow makes a `POST` request to the Slack webhook when a new PR is
@@ -81,10 +92,14 @@ action.
**PR:** opened
-### New discussion notification
+## Downstream workflows
-This workflow makes a `POST` request to the Slack webhook when a new
-discussion is created, sending a notification message to the
-`#openverse-notifications` channel.
+These workflows run only in the downstream synced repos and not in `openverse`.
-**Discussion:** created
+### Draft release
+
+This workflow updates the draft release message when new commits are added to
+`main` so that there is a ready-to-go changelog when publishing a new release.
+
+**Push:** Branch `main`
+**Config:** `.github/release_drafter.yml`
diff --git a/.github/release_drafter.yml b/.github/release_drafter.yml
new file mode 100644
index 000000000..6e36143ef
--- /dev/null
+++ b/.github/release_drafter.yml
@@ -0,0 +1,37 @@
+# yaml-language-server: $schema=https://raw.githubusercontent.com/release-drafter/release-drafter/master/schema.json
+#
+# Configuration for the action `release-drafter/release-drafter`
+# Docs: https://github.com/release-drafter/release-drafter
+# Workflow: Draft release
+
+name-template: "v$RESOLVED_VERSION"
+tag-template: "v$RESOLVED_VERSION"
+categories:
+ - title: New Features
+ label: "🌟 goal: addition"
+ - title: Improvements
+ label: "✨ goal: improvement"
+ - title: Internal Improvements
+ labels:
+ - "πŸ€– aspect: dx"
+ - "🧰 goal: internal improvement"
+ - title: Bug Fixes
+ label: "πŸ›  goal: fix"
+change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
+version-resolver:
+ major:
+ labels:
+ - "πŸ’₯ versioning: major"
+ minor:
+ labels:
+ - "πŸŽ‰ versioning: minor"
+ patch:
+ labels:
+ - "πŸ› versioning: patch"
+ default: patch
+template: |
+ $CHANGES
+
+ ## Credits
+
+ Thanks to $CONTRIBUTORS for their contributions!
diff --git a/.github/sync.yml b/.github/sync.yml
index 87b676146..af1e3076f 100644
--- a/.github/sync.yml
+++ b/.github/sync.yml
@@ -1,3 +1,7 @@
+# Configuration file for the action `BetaHuhn/repo-file-sync-action`
+# Docs: https://github.com/BetaHuhn/repo-file-sync-action
+# Workflow: Meta file sync
+
group:
# Openverse
- repos: |
@@ -6,6 +10,7 @@ group:
WordPress/openverse-frontend
WordPress/openverse-browser-extension
files:
+ # Synced workflows
- source: .github/workflows/new_issues.yml
dest: .github/workflows/new_issues.yml
- source: .github/workflows/new_prs.yml
@@ -14,6 +19,12 @@ group:
dest: .github/workflows/pr_label_check.yml
- source: .github/workflows/pr_ping.yml
dest: .github/workflows/pr_ping.yml
+ # Downstream workflows
+ - source: .github/workflows_downstream/draft_release.yml
+ dest: .github/workflows/draft_release.yml
+ - source: .github/release_drafter.yml
+ dest: .github/release_drafter.yml
+ # Templates
- source: .github/ISSUE_TEMPLATE/
dest: .github/ISSUE_TEMPLATE/
- source: .github/PULL_REQUEST_TEMPLATE.md
diff --git a/.github/workflows_downstream/draft_release.yml b/.github/workflows_downstream/draft_release.yml
new file mode 100644
index 000000000..4312caf83
--- /dev/null
+++ b/.github/workflows_downstream/draft_release.yml
@@ -0,0 +1,19 @@
+name: Draft release
+# ℹ️ https://github.com/WordPress/openverse/blob/main/.github/GITHUB.md#draft-release
+
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ update_draft_release:
+ name: Update draft release
+ runs-on: ubuntu-latest
+ steps:
+ - name: Update draft release
+ uses: release-drafter/release-drafter@v5
+ with:
+ config-name: release_drafter.yml
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/data/labels.yml b/data/labels.yml
index e6038e0da..d93cad52f 100644
--- a/data/labels.yml
+++ b/data/labels.yml
@@ -117,29 +117,29 @@ groups:
labels:
# Programming languages
- name: javascript
- description: Requires writing JavaScript code
+ description: Requires familiarity with JavaScript
emoji: "🟨"
- name: python
- description: Requires writing Python code
+ description: Requires familiarity with Python
emoji: "🐍"
- name: php
- description: Requires writing PHP code
+ description: Requires familiarity with PHP
emoji: "🐘"
# Libraries / other software
- name: vue
- description: Requires writing Vue.js JavaScript code
+ description: Requires familiarity with Vue.js
emoji: "πŸ”§"
- name: django
- description: Requires writing Python with the Django framework
+ description: Requires familiarity with Django
emoji: "πŸ”§"
- name: airflow
- description: Requires working with Apache Airflow
+ description: Requires familiarity with Apache Airflow
emoji: "πŸ”§"
- name: docker
- description: Requires writing Docker configuration
+ description: Requires familiarity with Docker
emoji: "🐳"
- name: postgres
- description: Requires working with PostgreSQL migrations or databases
+ description: Requires familiarity with PostgreSQL
emoji: "πŸ’Ύ"
- name: friendliness
@@ -158,6 +158,21 @@ groups:
description: Restricted to staff members
emoji: "πŸ”’"
+ # Labels for semantic versioning
+ # Docs: https://semver.org
+ - name: versioning
+ color:
+ labels:
+ - name: major
+ description: Major version bump, associated with breaking change
+ emoji: "πŸ’₯"
+ - name: minor
+ description: Minor version bump, associated with new feature
+ emoji: "πŸŽ‰"
+ - name: patch
+ description: Patch version bump, associated with bug fix
+ emoji: "πŸ›"
+
standalone:
- name: "γƒŽΰ² η›Šΰ² γƒŽε½‘β”»β”β”»"
color: "000000"