Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Remove workflows for automation of old projects (#2338)
Krystle Salazarcc93d2258699
diff --git a/.github/GITHUB.md b/.github/GITHUB.mdindex 213aaed17..c3c60de0d 100644--- a/.github/GITHUB.md+++ b/.github/GITHUB.md@@ -61,23 +61,14 @@ truth, it creates PRs to resolve any differences.### New issue automation-This workflow adds issues to the "Backlog" column in the [(old) Openverse project](https://github.com/orgs/WordPress/projects/3/) as-soon as they are created.-This workflow also adds issues to the "Backlog" column in the- [Openverse project](https://github.com/orgs/WordPress/projects/75/) as soon as they are created. It also adds a priority field-value to the project item based on the priority label applied to the issue.+This workflow adds issues to the "Backlog" column in the+[Openverse project](https://github.com/orgs/WordPress/projects/75/) as soon as+they are created. It also adds a priority field value to the project item based+on the priority label applied to the issue.**Issue:** opened**Dispatch:** disabled-### New PR automation--This workflow adds PRs to the "In progress" or "Needs review" columns in the-Openverse PRs project, based on whether they are marked as draft or ready.--**PR:** opened, converted_to_draft, ready_for_review-**Dispatch:** disabled-### PR label checkThis workflow ensures that all PRs have one label from each of the groupsdiff --git a/.github/workflows/new_issues.yml b/.github/workflows/new_issues.ymlindex e25a51d45..9b48dad2b 100644--- a/.github/workflows/new_issues.yml+++ b/.github/workflows/new_issues.yml@@ -10,18 +10,6 @@ env:ISSUE_ID: ${{ github.event.issue.node_id }} # The global issue ID that works in both REST and GraphQL APIs.jobs:- add_issue:- name: Add new issue- runs-on: ubuntu-latest- steps:- - name: Add issue to "Backlog"- uses: alex-page/[email protected]- with:- project: Openverse- column: Backlog- # TODO: Switch to GITHUB_TOKEN if the project is moved to a repo- repo-token: ${{ secrets.ACCESS_TOKEN }}-add_issue_to_project:name: Add new issue to projectruns-on: ubuntu-latestdiff --git a/.github/workflows/new_prs.yml b/.github/workflows/new_prs.ymldeleted file mode 100644index b424311a7..000000000--- a/.github/workflows/new_prs.yml+++ /dev/null@@ -1,36 +0,0 @@-name: New PR automation-# ℹ️ https://github.com/WordPress/openverse/blob/main/.github/GITHUB.md#new-pr-automation--on:- pull_request_target:- types:- - opened- - converted_to_draft- - ready_for_review--jobs:- add_draft:- name: Add draft PR- if: ${{ github.event.pull_request.draft }}- runs-on: ubuntu-latest- steps:- - name: Add PR to "In progress"- uses: alex-page/[email protected]- with:- project: Openverse PRs- column: In progress- # TODO: Switch to GITHUB_TOKEN if the project is moved to a repo- repo-token: ${{ secrets.ACCESS_TOKEN }}-- add_ready:- name: Add ready PR- if: ${{ !github.event.pull_request.draft }}- runs-on: ubuntu-latest- steps:- - name: Add PR to "Needs review"- uses: alex-page/[email protected]- with:- project: Openverse PRs- column: Needs review- # TODO: Switch to GITHUB_TOKEN if the project is moved to a repo- repo-token: ${{ secrets.ACCESS_TOKEN }}diff --git a/.github/workflows/pr_project_automation.yml b/.github/workflows/pr_project_automation.ymldeleted file mode 100644index 1484ed582..000000000--- a/.github/workflows/pr_project_automation.yml+++ /dev/null@@ -1,39 +0,0 @@-name: PR project automation-# ℹ️ https://github.com/WordPress/openverse/blob/main/.github/GITHUB.md#pr-project-automation--on:- workflow_dispatch:- schedule:- - cron: "15 15 * * 2" # 3:15pm on Tuesday--env:- LOGGING_LEVEL: 20 # corresponds to INFO- ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} # Using GITHUB_TOKEN causes server error.--jobs:- clear_done:- name: Clear done PRs- runs-on: ubuntu-latest- steps:- - name: Checkout repository- uses: actions/checkout@v3-- - name: Setup CI env- uses: ./.github/actions/setup-env- with:- setup_nodejs: false # Node.js is not needed to run Python automations.- install_recipe: "automations/python/install"-- - name: Clear PRs in "Merged!"- working-directory: ./automations/python- run: |- pipenv run python archive_column.py \- --project-number 8 \- --column 'Merged!'-- - name: Clear PRs in "Closed"- working-directory: ./automations/python- run: |- pipenv run python archive_column.py \- --project-number 8 \- --column "Closed"diff --git a/.github/workflows/project_automation.yml b/.github/workflows/project_automation.ymldeleted file mode 100644index 894b78d2a..000000000--- a/.github/workflows/project_automation.yml+++ /dev/null@@ -1,52 +0,0 @@-name: Project automation-# ℹ️ https://github.com/WordPress/openverse/blob/main/.github/GITHUB.md#project-automation--on:- workflow_dispatch:- schedule:- - cron: "*/15 * * * *" # every 15 minutes--env:- LOGGING_LEVEL: 20 # corresponds to INFO- ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} # Can't search in the private infra repo with GITHUB_TOKEN--jobs:- move_issues:- name: Move issues to "In Progress"- runs-on: ubuntu-latest- steps:- - name: Checkout repository- uses: actions/checkout@v3-- - name: Setup CI env- uses: ./.github/actions/setup-env- with:- setup_nodejs: false # Node.js is not needed to run Python automations.- install_recipe: "automations/python/install"-- - name: Move stale issues from "In progress"- working-directory: ./automations/python- run: |- pipenv run python issues_with_prs.py \- --project-number 3 \- --source-column "In progress" \- --target-column "Backlog" \- --linked-pr-state "closed"-- - name: Move issues from "To do"- working-directory: ./automations/python- run: |- pipenv run python issues_with_prs.py \- --project-number 3 \- --source-column "To do" \- --target-column "In progress" \- --linked-pr-state "open"-- - name: Move issues from "Backlog"- working-directory: ./automations/python- run: |- pipenv run python issues_with_prs.py \- --project-number 3 \- --source-column "Backlog" \- --target-column "In progress" \- --linked-pr-state "open"