From a64df7990121facef0ed05ff0c3a9d92e9e975f6 Mon Sep 17 00:00:00 2001 From: Aabishkar KC Date: Fri, 8 Sep 2023 11:05:45 -0400 Subject: [PATCH] DYN-6172 Update issues workflow (#2965) - remove issue from DynamoRevitIssues before transfer - add step to move issue to DynamoWishlist repository --- .github/workflows/issues.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index 24f9d5137..362a66fbe 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -1,4 +1,6 @@ name: Issues workflow +# This workflow transfers or moves issues based upon assigned labels. + # DynamoRevitIssues project https://github.com/orgs/DynamoDS/projects/7 # Built-in workflow https://github.com/orgs/DynamoDS/projects/7/workflows/11382076 @@ -10,6 +12,7 @@ name: Issues workflow # This workflow complements the built in workflow and # - moves issues labeled as 'Dynamo' to 'DynamoDS/Dynamo' repository +# - moves issues labeled as 'Wishlist' to 'DynamoDS/DynamoWishlist' repository # - moves issues labeled as 'tracked' to 'Todo' column the project # - moves assigned issues to 'In Progress' column the project @@ -23,17 +26,27 @@ env: gh_token: ${{ secrets.DYNAMO_ISSUES_TOKEN }} gh_organization: DynamoDS project_id: 7 + project_name: DynamoRevitIssues jobs: issue_labeled: name: issue labeled runs-on: ubuntu-latest - if: github.event_name == 'issues' && github.event.action == 'labeled' + if: github.event.action == 'labeled' steps: - uses: actions/checkout@v3 - name: Move issue to Dynamo Repository if: github.event.label.name == 'Dynamo' - run: gh issue transfer ${{ github.event.issue.number }} DynamoDS/Dynamo + run: | + gh issue edit ${{ github.event.issue.number }} --remove-project ${{ env.project_name }} + gh issue transfer ${{ github.event.issue.number }} DynamoDS/Dynamo + env: + GITHUB_TOKEN: ${{ env.gh_token }} + - name: Move issue to DynamoWishlist Repository + if: github.event.label.name == 'Wishlist' + run: | + gh issue edit ${{ github.event.issue.number }} --remove-project ${{ env.project_name }} + gh issue transfer ${{ github.event.issue.number }} DynamoDS/DynamoWishlist env: GITHUB_TOKEN: ${{ env.gh_token }} - name: Move issue to Todo @@ -49,7 +62,7 @@ jobs: issue_assigned: name: issue assigned runs-on: ubuntu-latest - if: github.event_name == 'issues' && github.event.action == 'assigned' + if: github.event.action == 'assigned' steps: - name: Move issue to In Progress uses: leonsteinhaeuser/project-beta-automations@v2.1.0