Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix project-autoadd github action #5080

Merged
merged 11 commits into from
Nov 26, 2022
94 changes: 50 additions & 44 deletions .github/workflows/project-autoadd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,57 @@ on:
types: [opened, labeled]
pull_request:
types: [opened, labeled]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
assign_one_project:
add_opened_to_inbox_board:
name: Add New Issue/PR to Terasology Inbox Board
if: github.event.action == 'opened'
runs-on: ubuntu-latest
name: Assign to One Project
steps:

- name: Assign NEW issues and issues to bug/inbox board's inbox
uses: srggrs/assign-one-project-github-action@1.2.1
if: github.event.action == 'opened'
with:
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/26'
column_name: 'New (Inbox)'

- name: Assign bug report issues and pull requests to bug board backlog
uses: srggrs/assign-one-project-github-action@1.2.1
if: |
contains(github.event.issue.labels.*.name, 'Type: Bug') ||
contains(github.event.pull_request.labels.*.name, 'Type: Bug')
with:
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/26'
column_name: 'Backlog'

- name: Assign stabilization / refactoring / maintenance issues and pull requests to stabilization board backlog
uses: srggrs/assign-one-project-github-action@1.2.1
if: |
github.event.action != 'opened' &&
( contains(github.event.issue.labels.*.name, 'Type: Refactoring') ||
contains(github.event.pull_request.labels.*.name, 'Type: Refactoring') ||
contains(github.event.issue.labels.*.name, 'Type: Chore') ||
contains(github.event.pull_request.labels.*.name, 'Type: Chore') ||
contains(github.event.issue.labels.*.name, 'Topic: Stabilization') && !contains(github.event.issue.labels.*.name, 'Type: Bug') ||
contains(github.event.pull_request.labels.*.name, 'Topic: Stabilization') && !contains(github.event.pull_request.labels.*.name, 'Type: Bug') )
with:
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/25'
column_name: 'Backlog'

- name: Assign improvement issues and pull requests to feature board backlog
uses: srggrs/assign-one-project-github-action@1.2.1
if: |
github.event.action != 'opened' &&
contains(github.event.issue.labels.*.name, 'Type: Improvement') && !contains(github.event.issue.labels.*.name, 'Topic: Stabilization') ||
contains(github.event.pull_request.labels.*.name, 'Type: Improvement') && !contains(github.event.pull_request.labels.*.name, 'Topic: Stabilization')
with:
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/27'
column_name: 'Backlog'
- name: Add to inbox board
uses: actions/add-to-project@v0.3.0
with:
project-url: 'https://github.com/orgs/MovingBlocks/projects/26'
github-token: ${{ secrets.PROJECT_GITHUB_TOKEN }}
add_bug_labeled_to_bug_board:
name: Assign bug report issues and pull requests to bug board backlog
if: |
contains(github.event.issue.labels.*.name, 'Type: Bug') ||
contains(github.event.pull_request.labels.*.name, 'Type: Bug')
runs-on: ubuntu-latest
steps:
- name: Add to bug board
uses: actions/add-to-project@v0.3.0
with:
project-url: 'https://github.com/orgs/MovingBlocks/projects/29'
github-token: ${{ secrets.PROJECT_GITHUB_TOKEN }}
add_maintenance_to_stabilization_board:
name: Assign stabilization / refactoring / chore issues and pull requests to stabilization board backlog
if: |
github.event.action != 'opened' &&
( contains(github.event.issue.labels.*.name, 'Type: Refactoring') ||
contains(github.event.pull_request.labels.*.name, 'Type: Refactoring') ||
contains(github.event.issue.labels.*.name, 'Type: Chore') ||
contains(github.event.pull_request.labels.*.name, 'Type: Chore') ||
contains(github.event.issue.labels.*.name, 'Topic: Stabilization') && !contains(github.event.issue.labels.*.name, 'Type: Bug') ||
contains(github.event.pull_request.labels.*.name, 'Topic: Stabilization') && !contains(github.event.pull_request.labels.*.name, 'Type: Bug') )
runs-on: ubuntu-latest
steps:
- name: Add to stabilization board
uses: actions/add-to-project@v0.3.0
with:
project-url: 'https://github.com/orgs/MovingBlocks/projects/25'
github-token: ${{ secrets.PROJECT_GITHUB_TOKEN }}
add_features_to_feature_board:
name: Assign improvement issues and pull requests to feature board backlog
if: |
github.event.action != 'opened' &&
contains(github.event.issue.labels.*.name, 'Type: Improvement') && !contains(github.event.issue.labels.*.name, 'Topic: Stabilization') ||
contains(github.event.pull_request.labels.*.name, 'Type: Improvement') && !contains(github.event.pull_request.labels.*.name, 'Topic: Stabilization')
runs-on: ubuntu-latest
steps:
- name: Add to feature board
uses: actions/add-to-project@v0.3.0
with:
project-url: 'https://github.com/orgs/MovingBlocks/projects/27'
github-token: ${{ secrets.PROJECT_GITHUB_TOKEN }}