|
| 1 | +name: Move labelled issues to correct boards and columns |
| 2 | + |
| 3 | +on: |
| 4 | + issues: |
| 5 | + types: [labeled] |
| 6 | + |
| 7 | +jobs: |
| 8 | + apply_Z-Labs_label: |
| 9 | + name: Add Z-Labs label for features behind labs flags |
| 10 | + runs-on: ubuntu-latest |
| 11 | + if: > |
| 12 | + contains(github.event.issue.labels.*.name, 'A-Maths') || |
| 13 | + contains(github.event.issue.labels.*.name, 'A-Message-Pinning') || |
| 14 | + contains(github.event.issue.labels.*.name, 'A-Threads') || |
| 15 | + contains(github.event.issue.labels.*.name, 'A-Polls') || |
| 16 | + contains(github.event.issue.labels.*.name, 'A-Location-Sharing') || |
| 17 | + contains(github.event.issue.labels.*.name, 'A-Message-Bubbles') || |
| 18 | + contains(github.event.issue.labels.*.name, 'Z-IA') || |
| 19 | + contains(github.event.issue.labels.*.name, 'A-Themes-Custom') || |
| 20 | + contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') || |
| 21 | + contains(github.event.issue.labels.*.name, 'A-Tags') |
| 22 | + steps: |
| 23 | + - uses: actions/github-script@v5 |
| 24 | + with: |
| 25 | + script: | |
| 26 | + github.rest.issues.addLabels({ |
| 27 | + issue_number: context.issue.number, |
| 28 | + owner: context.repo.owner, |
| 29 | + repo: context.repo.repo, |
| 30 | + labels: ['Z-Labs'] |
| 31 | + }) |
| 32 | +
|
| 33 | + move_needs_info_issues: |
| 34 | + name: X-Needs-Info issues to Need info column on triage board |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - uses: konradpabjan/move-labeled-or-milestoned-issue@219d384e03fa4b6460cd24f9f37d19eb033a4338 |
| 38 | + with: |
| 39 | + action-token: "${{ secrets.ELEMENT_BOT_TOKEN }}" |
| 40 | + project-url: "https://github.com/vector-im/element-web/projects/27" |
| 41 | + column-name: "Need info" |
| 42 | + label-name: "X-Needs-Info" |
| 43 | + |
| 44 | + add_priority_design_issues_to_project: |
| 45 | + name: P1 X-Needs-Design to Design project board |
| 46 | + runs-on: ubuntu-latest |
| 47 | + if: > |
| 48 | + contains(github.event.issue.labels.*.name, 'X-Needs-Design') && |
| 49 | + (contains(github.event.issue.labels.*.name, 'S-Critical') && |
| 50 | + (contains(github.event.issue.labels.*.name, 'O-Frequent') || |
| 51 | + contains(github.event.issue.labels.*.name, 'O-Occasional')) || |
| 52 | + contains(github.event.issue.labels.*.name, 'S-Major') && |
| 53 | + contains(github.event.issue.labels.*.name, 'O-Frequent') || |
| 54 | + contains(github.event.issue.labels.*.name, 'A11y') && |
| 55 | + contains(github.event.issue.labels.*.name, 'O-Frequent')) |
| 56 | + steps: |
| 57 | + |
| 58 | + id: add_to_project |
| 59 | + with: |
| 60 | + headers: '{"GraphQL-Features": "projects_next_graphql"}' |
| 61 | + query: | |
| 62 | + mutation add_to_project($projectid:ID!,$contentid:ID!) { |
| 63 | + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { |
| 64 | + projectNextItem { |
| 65 | + id |
| 66 | + } |
| 67 | + } |
| 68 | + } |
| 69 | + projectid: ${{ env.PROJECT_ID }} |
| 70 | + contentid: ${{ github.event.issue.node_id }} |
| 71 | + env: |
| 72 | + PROJECT_ID: "PN_kwDOAM0swc0sUA" |
| 73 | + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} |
| 74 | + |
| 75 | + add_product_issues: |
| 76 | + name: X-Needs-Product to Design project board |
| 77 | + runs-on: ubuntu-latest |
| 78 | + if: > |
| 79 | + contains(github.event.issue.labels.*.name, 'X-Needs-Product') |
| 80 | + steps: |
| 81 | + |
| 82 | + id: add_to_project |
| 83 | + with: |
| 84 | + headers: '{"GraphQL-Features": "projects_next_graphql"}' |
| 85 | + query: | |
| 86 | + mutation add_to_project($projectid:ID!,$contentid:ID!) { |
| 87 | + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { |
| 88 | + projectNextItem { |
| 89 | + id |
| 90 | + } |
| 91 | + } |
| 92 | + } |
| 93 | + projectid: ${{ env.PROJECT_ID }} |
| 94 | + contentid: ${{ github.event.issue.node_id }} |
| 95 | + env: |
| 96 | + PROJECT_ID: "PN_kwDOAM0swc4AAg6N" |
| 97 | + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} |
| 98 | + |
| 99 | + Delight_issues_to_board: |
| 100 | + name: Delight issues to project board |
| 101 | + runs-on: ubuntu-latest |
| 102 | + if: > |
| 103 | + contains(github.event.issue.labels.*.name, 'A-Spaces') || |
| 104 | + contains(github.event.issue.labels.*.name, 'A-Space-Settings') || |
| 105 | + contains(github.event.issue.labels.*.name, 'A-Subspaces') || |
| 106 | + contains(github.event.issue.labels.*.name, 'Z-IA') |
| 107 | + steps: |
| 108 | + |
| 109 | + with: |
| 110 | + headers: '{"GraphQL-Features": "projects_next_graphql"}' |
| 111 | + query: | |
| 112 | + mutation add_to_project($projectid:ID!,$contentid:ID!) { |
| 113 | + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { |
| 114 | + projectNextItem { |
| 115 | + id |
| 116 | + } |
| 117 | + } |
| 118 | + } |
| 119 | + projectid: ${{ env.PROJECT_ID }} |
| 120 | + contentid: ${{ github.event.issue.node_id }} |
| 121 | + env: |
| 122 | + PROJECT_ID: "PN_kwDOAM0swc1HvQ" |
| 123 | + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} |
| 124 | + |
| 125 | + move_voice-message_issues: |
| 126 | + name: A-Voice Messages to voice message board |
| 127 | + runs-on: ubuntu-latest |
| 128 | + if: > |
| 129 | + contains(github.event.issue.labels.*.name, 'A-Voice Messages') |
| 130 | + steps: |
| 131 | + |
| 132 | + with: |
| 133 | + headers: '{"GraphQL-Features": "projects_next_graphql"}' |
| 134 | + query: | |
| 135 | + mutation add_to_project($projectid:ID!,$contentid:ID!) { |
| 136 | + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { |
| 137 | + projectNextItem { |
| 138 | + id |
| 139 | + } |
| 140 | + } |
| 141 | + } |
| 142 | + projectid: ${{ env.PROJECT_ID }} |
| 143 | + contentid: ${{ github.event.issue.node_id }} |
| 144 | + env: |
| 145 | + PROJECT_ID: "PN_kwDOAM0swc2KCw" |
| 146 | + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} |
| 147 | + |
| 148 | + move_threads_issues: |
| 149 | + name: A-Threads to Thread board |
| 150 | + runs-on: ubuntu-latest |
| 151 | + if: > |
| 152 | + contains(github.event.issue.labels.*.name, 'A-Threads') |
| 153 | + steps: |
| 154 | + |
| 155 | + with: |
| 156 | + headers: '{"GraphQL-Features": "projects_next_graphql"}' |
| 157 | + query: | |
| 158 | + mutation add_to_project($projectid:ID!,$contentid:ID!) { |
| 159 | + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { |
| 160 | + projectNextItem { |
| 161 | + id |
| 162 | + } |
| 163 | + } |
| 164 | + } |
| 165 | + projectid: ${{ env.PROJECT_ID }} |
| 166 | + contentid: ${{ github.event.issue.node_id }} |
| 167 | + env: |
| 168 | + PROJECT_ID: "PN_kwDOAM0swc0rRA" |
| 169 | + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} |
| 170 | + |
| 171 | + move_message_bubbles_issues: |
| 172 | + name: A-Message-Bubbles to Message bubbles board |
| 173 | + runs-on: ubuntu-latest |
| 174 | + if: > |
| 175 | + contains(github.event.issue.labels.*.name, 'A-Message-Bubbles') |
| 176 | + steps: |
| 177 | + |
| 178 | + with: |
| 179 | + headers: '{"GraphQL-Features": "projects_next_graphql"}' |
| 180 | + query: | |
| 181 | + mutation add_to_project($projectid:ID!,$contentid:ID!) { |
| 182 | + addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) { |
| 183 | + projectNextItem { |
| 184 | + id |
| 185 | + } |
| 186 | + } |
| 187 | + } |
| 188 | + projectid: ${{ env.PROJECT_ID }} |
| 189 | + contentid: ${{ github.event.issue.node_id }} |
| 190 | + env: |
| 191 | + PROJECT_ID: "PN_kwDOAM0swc3m-g" |
| 192 | + GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} |
0 commit comments