Skip to content

Commit

Permalink
chore: remove redundant workflow step
Browse files Browse the repository at this point in the history
- this is hooked up to an old board (project 67)
- writers are using UI workflow settings for their new board (project 108)
- this is causing both projects to now be added to PRs and issues
  • Loading branch information
tabathadelane committed Aug 27, 2024
1 parent baa6b97 commit 58a6fc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 40 deletions.
34 changes: 9 additions & 25 deletions .github/workflows/issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,19 @@ env:
COLUMN_NAME: Hero to triage # column where issues will be created

jobs:
content_project:
runs-on: ubuntu-latest
env:
PROJECT_ID: 11873277
PROJECT_NAME: Docs PRs and Issues
name: Triage to Content Project
steps:
- name: Triages NEW issues to the Content Project
if: github.event.action == 'opened'
run: |
HEADER="Accept: application/vnd.github.inertia-preview+json"
ISSUE_ID=${{ github.event.issue.id }}
COLUMN=$(gh api -H "$HEADER" projects/$PROJECT_ID/columns --jq ".[] | select(.name == \"$COLUMN_NAME\").id")
gh api -H "$HEADER" -X POST projects/columns/$COLUMN/cards -f content_type='Issue' -F content_id=$ISSUE_ID
localization_project:
runs-on: ubuntu-latest
env:
PROJECT_ID: 12004783
PROJECT_NAME: Docs Site Localization PRs and Issues
name: Triage to Localization Project
steps:
- name: Triages NEW issues to the Localization Project
if: |
github.event.action == 'labeled' &&
contains(github.event.issue.labels.*.name, 'localization')
run: |
HEADER="Accept: application/vnd.github.inertia-preview+json"
ISSUE_ID=${{ github.event.issue.id }}
COLUMN=$(gh api -H "$HEADER" projects/$PROJECT_ID/columns --jq ".[] | select(.name == \"$COLUMN_NAME\").id")
gh api -H "$HEADER" -X POST projects/columns/$COLUMN/cards -f content_type='Issue' -F content_id=$ISSUE_ID
- name: Triages NEW issues to the Localization Project
if: |
github.event.action == 'labeled' &&
contains(github.event.issue.labels.*.name, 'localization')
run: |
HEADER="Accept: application/vnd.github.inertia-preview+json"
ISSUE_ID=${{ github.event.issue.id }}
COLUMN=$(gh api -H "$HEADER" projects/$PROJECT_ID/columns --jq ".[] | select(.name == \"$COLUMN_NAME\").id")
gh api -H "$HEADER" -X POST projects/columns/$COLUMN/cards -f content_type='Issue' -F content_id=$ISSUE_ID
15 changes: 0 additions & 15 deletions .github/workflows/pr-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@ env:
COLUMN_NAME: Hero to triage # column where issues will be created

jobs:
content_project:
name: pr added to the docs github board (optional)
runs-on: ubuntu-latest
env:
PROJECT_ID: 11873277
PROJECT_NAME: Docs PRs and Issues
steps:
- name: Triages NEW pull requests to the Content Project
if: github.event.action == 'opened'
run: |
HEADER="Accept: application/vnd.github.inertia-preview+json"
PR_ID=${{ github.event.pull_request.id }}
COLUMN=$(gh api -H "$HEADER" projects/$PROJECT_ID/columns --jq ".[] | select(.name == \"$COLUMN_NAME\").id")
gh api -H "$HEADER" -X POST projects/columns/$COLUMN/cards -f content_type='PullRequest' -F content_id=$PR_ID
localization_project:
name: pr added to the localization github board (optional)
runs-on: ubuntu-latest
Expand Down

0 comments on commit 58a6fc5

Please sign in to comment.