Skip issue triage actions in forks

This commit is contained in:
Florian Renaud 2021-12-17 17:18:39 +01:00
parent 461beda634
commit 58f7c83f4e
4 changed files with 87 additions and 76 deletions

View File

@ -2,11 +2,13 @@ name: Move new issues onto Issue triage board
on: on:
issues: issues:
types: [opened] types: [ opened ]
jobs: jobs:
automate-project-columns: automate-project-columns:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: |
github.repository == 'vector-im/element-android' # Skip in forks
steps: steps:
- uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488 - uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488
with: with:

View File

@ -2,12 +2,14 @@ name: Move labelled issues to correct boards and columns
on: on:
issues: issues:
types: [labeled] types: [ labeled ]
jobs: jobs:
move_needs_info_issues: move_needs_info_issues:
name: X-Needs-Info issues to Need info column on triage board name: X-Needs-Info issues to Need info column on triage board
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: |
github.repository == 'vector-im/element-android' # Skip in forks
steps: steps:
- uses: konradpabjan/move-labeled-or-milestoned-issue@219d384e03fa4b6460cd24f9f37d19eb033a4338 - uses: konradpabjan/move-labeled-or-milestoned-issue@219d384e03fa4b6460cd24f9f37d19eb033a4338
with: with:
@ -19,15 +21,16 @@ jobs:
add_priority_design_issues_to_project: add_priority_design_issues_to_project:
name: P1 X-Needs-Design to Design project board name: P1 X-Needs-Design to Design project board
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: > if: |
contains(github.event.issue.labels.*.name, 'X-Needs-Design') && github.repository == 'vector-im/element-android' && # Skip in forks
(contains(github.event.issue.labels.*.name, 'S-Critical') && contains(github.event.issue.labels.*.name, 'X-Needs-Design') &&
(contains(github.event.issue.labels.*.name, 'O-Frequent') || (contains(github.event.issue.labels.*.name, 'S-Critical') &&
(contains(github.event.issue.labels.*.name, 'O-Frequent') ||
contains(github.event.issue.labels.*.name, 'O-Occasional')) || contains(github.event.issue.labels.*.name, 'O-Occasional')) ||
contains(github.event.issue.labels.*.name, 'S-Major') && contains(github.event.issue.labels.*.name, 'S-Major') &&
contains(github.event.issue.labels.*.name, 'O-Frequent') || contains(github.event.issue.labels.*.name, 'O-Frequent') ||
contains(github.event.issue.labels.*.name, 'A11y') && contains(github.event.issue.labels.*.name, 'A11y') &&
contains(github.event.issue.labels.*.name, 'O-Frequent')) contains(github.event.issue.labels.*.name, 'O-Frequent'))
steps: steps:
- uses: octokit/graphql-action@v2.x - uses: octokit/graphql-action@v2.x
id: add_to_project id: add_to_project
@ -47,36 +50,38 @@ jobs:
PROJECT_ID: "PN_kwDOAM0swc0sUA" PROJECT_ID: "PN_kwDOAM0swc0sUA"
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
# delight_issues_to_board: # delight_issues_to_board:
# name: Spaces issues to new Delight project board # name: Spaces issues to new Delight project board
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
# if: > # if: |
# contains(github.event.issue.labels.*.name, 'A-Spaces') || # github.repository == 'vector-im/element-android' && # Skip in forks
# contains(github.event.issue.labels.*.name, 'A-Space-Settings') || # contains(github.event.issue.labels.*.name, 'A-Spaces') ||
# contains(github.event.issue.labels.*.name, 'A-Subspaces') # contains(github.event.issue.labels.*.name, 'A-Space-Settings') ||
# steps: # contains(github.event.issue.labels.*.name, 'A-Subspaces')
# - uses: octokit/graphql-action@v2.x # steps:
# with: # - uses: octokit/graphql-action@v2.x
# headers: '{"GraphQL-Features": "projects_next_graphql"}' # with:
# query: | # headers: '{"GraphQL-Features": "projects_next_graphql"}'
# mutation add_to_project($projectid:ID!,$contentid:ID!) { # query: |
# addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { # mutation add_to_project($projectid:ID!,$contentid:ID!) {
# projectNextItem { # addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) {
# id # projectNextItem {
# } # id
# } # }
# } # }
# projectid: ${{ env.PROJECT_ID }} # }
# contentid: ${{ github.event.issue.node_id }} # projectid: ${{ env.PROJECT_ID }}
# env: # contentid: ${{ github.event.issue.node_id }}
# PROJECT_ID: "PN_kwDOAM0swc1HvQ" # env:
# GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} # PROJECT_ID: "PN_kwDOAM0swc1HvQ"
# GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
move_voice-message_issues: move_voice-message_issues:
name: A-Voice Messages to voice message board name: A-Voice Messages to voice message board
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: > if: |
contains(github.event.issue.labels.*.name, 'A-Voice Messages') github.repository == 'vector-im/element-android' && # Skip in forks
contains(github.event.issue.labels.*.name, 'A-Voice Messages')
steps: steps:
- uses: octokit/graphql-action@v2.x - uses: octokit/graphql-action@v2.x
with: with:
@ -98,8 +103,9 @@ jobs:
move_threads_issues: move_threads_issues:
name: A-Threads to Thread board name: A-Threads to Thread board
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: > if: |
contains(github.event.issue.labels.*.name, 'A-Threads') github.repository == 'vector-im/element-android' && # Skip in forks
contains(github.event.issue.labels.*.name, 'A-Threads')
steps: steps:
- uses: octokit/graphql-action@v2.x - uses: octokit/graphql-action@v2.x
with: with:
@ -121,8 +127,9 @@ jobs:
move_message_bubbles_issues: move_message_bubbles_issues:
name: A-Message-Bubbles to Message bubbles board name: A-Message-Bubbles to Message bubbles board
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: > if: |
contains(github.event.issue.labels.*.name, 'A-Message-Bubbles') github.repository == 'vector-im/element-android' && # Skip in forks
contains(github.event.issue.labels.*.name, 'A-Message-Bubbles')
steps: steps:
- uses: octokit/graphql-action@v2.x - uses: octokit/graphql-action@v2.x
with: with:

View File

@ -2,15 +2,15 @@ name: Move unlabelled from needs info columns to triaged
on: on:
issues: issues:
types: [unlabeled] types: [ unlabeled ]
jobs: jobs:
Move_Unabeled_Issue_On_Project_Board: Move_Unabeled_Issue_On_Project_Board:
name: Move no longer X-Needs-Info issues to Triaged name: Move no longer X-Needs-Info issues to Triaged
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: > if: |
${{ github.repository == 'vector-im/element-android' && # Skip in forks
!contains(github.event.issue.labels.*.name, 'X-Needs-Info') }} !contains(github.event.issue.labels.*.name, 'X-Needs-Info')
env: env:
BOARD_NAME: "Issue triage" BOARD_NAME: "Issue triage"
OWNER: ${{ github.repository_owner }} OWNER: ${{ github.repository_owner }}

View File

@ -2,28 +2,29 @@ name: Move P1 bugs to boards
on: on:
issues: issues:
types: [labeled, unlabeled] types: [ labeled, unlabeled ]
jobs: jobs:
p1_issues_to_team_workboard: p1_issues_to_team_workboard:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: > if: |
(!contains(github.event.issue.labels.*.name, 'A-E2EE') && github.repository == 'vector-im/element-android' && # Skip in forks
!contains(github.event.issue.labels.*.name, 'A-E2EE-Cross-Signing') && (!contains(github.event.issue.labels.*.name, 'A-E2EE') &&
!contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') && !contains(github.event.issue.labels.*.name, 'A-E2EE-Cross-Signing') &&
!contains(github.event.issue.labels.*.name, 'A-E2EE-Key-Backup') && !contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') &&
!contains(github.event.issue.labels.*.name, 'A-E2EE-SAS-Verification') && !contains(github.event.issue.labels.*.name, 'A-E2EE-Key-Backup') &&
!contains(github.event.issue.labels.*.name, 'A-Spaces') && !contains(github.event.issue.labels.*.name, 'A-E2EE-SAS-Verification') &&
!contains(github.event.issue.labels.*.name, 'A-Spaces-Settings') && !contains(github.event.issue.labels.*.name, 'A-Spaces') &&
!contains(github.event.issue.labels.*.name, 'A-Subspaces')) && !contains(github.event.issue.labels.*.name, 'A-Spaces-Settings') &&
(contains(github.event.issue.labels.*.name, 'T-Defect') && !contains(github.event.issue.labels.*.name, 'A-Subspaces')) &&
contains(github.event.issue.labels.*.name, 'S-Critical') && (contains(github.event.issue.labels.*.name, 'T-Defect') &&
(contains(github.event.issue.labels.*.name, 'O-Frequent') || contains(github.event.issue.labels.*.name, 'S-Critical') &&
(contains(github.event.issue.labels.*.name, 'O-Frequent') ||
contains(github.event.issue.labels.*.name, 'O-Occasional')) || contains(github.event.issue.labels.*.name, 'O-Occasional')) ||
contains(github.event.issue.labels.*.name, 'S-Major') && contains(github.event.issue.labels.*.name, 'S-Major') &&
contains(github.event.issue.labels.*.name, 'O-Frequent') || contains(github.event.issue.labels.*.name, 'O-Frequent') ||
contains(github.event.issue.labels.*.name, 'A11y') && contains(github.event.issue.labels.*.name, 'A11y') &&
contains(github.event.issue.labels.*.name, 'O-Frequent')) contains(github.event.issue.labels.*.name, 'O-Frequent'))
steps: steps:
- uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488 - uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488
with: with:
@ -33,20 +34,21 @@ jobs:
P1_issues_to_crypto_team_workboard: P1_issues_to_crypto_team_workboard:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: > if: |
(contains(github.event.issue.labels.*.name, 'A-E2EE') || github.repository == 'vector-im/element-android' && # Skip in forks
contains(github.event.issue.labels.*.name, 'A-E2EE-Cross-Signing') || (contains(github.event.issue.labels.*.name, 'A-E2EE') ||
contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') || contains(github.event.issue.labels.*.name, 'A-E2EE-Cross-Signing') ||
contains(github.event.issue.labels.*.name, 'A-E2EE-Key-Backup') || contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') ||
contains(github.event.issue.labels.*.name, 'A-E2EE-SAS-Verification')) && contains(github.event.issue.labels.*.name, 'A-E2EE-Key-Backup') ||
(contains(github.event.issue.labels.*.name, 'T-Defect') && contains(github.event.issue.labels.*.name, 'A-E2EE-SAS-Verification')) &&
contains(github.event.issue.labels.*.name, 'S-Critical') && (contains(github.event.issue.labels.*.name, 'T-Defect') &&
(contains(github.event.issue.labels.*.name, 'O-Frequent') || contains(github.event.issue.labels.*.name, 'S-Critical') &&
(contains(github.event.issue.labels.*.name, 'O-Frequent') ||
contains(github.event.issue.labels.*.name, 'O-Occasional')) || contains(github.event.issue.labels.*.name, 'O-Occasional')) ||
contains(github.event.issue.labels.*.name, 'S-Major') && contains(github.event.issue.labels.*.name, 'S-Major') &&
contains(github.event.issue.labels.*.name, 'O-Frequent') || contains(github.event.issue.labels.*.name, 'O-Frequent') ||
contains(github.event.issue.labels.*.name, 'A11y') && contains(github.event.issue.labels.*.name, 'A11y') &&
contains(github.event.issue.labels.*.name, 'O-Frequent')) contains(github.event.issue.labels.*.name, 'O-Frequent'))
steps: steps:
- uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488 - uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488
with: with: