From 737187c71974450f4e023e457ffc0b9fb86d2728 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 7 Apr 2022 22:01:21 +0100 Subject: [PATCH] Update project automation --- .github/workflows/project-automation.yml | 71 ++---------------------- 1 file changed, 4 insertions(+), 67 deletions(-) diff --git a/.github/workflows/project-automation.yml b/.github/workflows/project-automation.yml index 14c46c0..ab8ccf7 100644 --- a/.github/workflows/project-automation.yml +++ b/.github/workflows/project-automation.yml @@ -3,71 +3,8 @@ on: issues: types: - opened - - reopened - - closed - pull_request: - types: - - opened - - reopened - - review_requested - - closed - -# map fields with customized labels -env: - todo: Todo - done: Done - in_progress: In Progress - jobs: - issue_opened_or_reopened: - name: issue_opened_or_reopened - runs-on: ubuntu-latest - if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'reopened') - steps: - - name: Move issue to ${{ env.todo }} - uses: leonsteinhaeuser/project-beta-automations@v1.1.0 - with: - gh_token: ${{ secrets.PROJECT_ACCESS_TOKEN }} - organization: flowforge - project_id: 1 - resource_node_id: ${{ github.event.issue.node_id }} - status_value: ${{ env.todo }} # Target status - issue_closed: - name: issue_closed - runs-on: ubuntu-latest - if: github.event_name == 'issues' && github.event.action == 'closed' - steps: - - name: Moved issue to ${{ env.done }} - uses: leonsteinhaeuser/project-beta-automations@v1.1.0 - with: - gh_token: ${{ secrets.PROJECT_ACCESS_TOKEN }} - organization: flowforge - project_id: 1 - resource_node_id: ${{ github.event.issue.node_id }} - status_value: ${{ env.done }} # Target status - pr_opened_or_reopened_or_reviewrequested: - name: pr_opened_or_reopened_or_reviewrequested - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'review_requested') - steps: - - name: Move PR to ${{ env.in_progress }} - uses: leonsteinhaeuser/project-beta-automations@v1.1.0 - with: - gh_token: ${{ secrets.PROJECT_ACCESS_TOKEN }} - organization: flowforge - project_id: 1 - resource_node_id: ${{ github.event.pull_request.node_id }} - status_value: ${{ env.in_progress }} # Target status - pr_closed: - name: pr_closed - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' && github.event.action == 'closed' - steps: - - name: Move PR to ${{ env.done }} - uses: leonsteinhaeuser/project-beta-automations@v1.1.0 - with: - gh_token: ${{ secrets.PROJECT_ACCESS_TOKEN }} - organization: flowforge - project_id: 1 - resource_node_id: ${{ github.event.pull_request.node_id }} - status_value: ${{ env.done }} # Target status + add_to_product_board: + uses: flowforge/.github/.github/workflows/project-automation.yml@main + secrets: + token: ${{ secrets.PROJECT_ACCESS_TOKEN }}