From d56f2e50e21058a1a3484c1691d6bb6d9832d64e Mon Sep 17 00:00:00 2001 From: Aabishkar KC Date: Fri, 10 Nov 2023 12:27:46 -0500 Subject: [PATCH] Update move issues workflow (#3004) * Update move issues workflow * Fix typos --- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/ISSUE_TEMPLATE/issue.yml | 8 +++---- .github/workflows/move_issues.yml | 38 +++++++++++++++++++------------ 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 9584d9887..726983b39 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,6 +1,6 @@ blank_issues_enabled: false contact_links: - - name: Dynamo Issues + - name: Dynamo Issue url: https://github.com/DynamoDS/Dynamo/issues/new/choose about: File an issue with Dynamo - name: Dynamo Wishlist diff --git a/.github/ISSUE_TEMPLATE/issue.yml b/.github/ISSUE_TEMPLATE/issue.yml index d22245e9b..65c421726 100644 --- a/.github/ISSUE_TEMPLATE/issue.yml +++ b/.github/ISSUE_TEMPLATE/issue.yml @@ -1,10 +1,10 @@ -name: Issue -description: File an issue +name: DynamoRevit Issue +description: File an issue with DynamoRevit projects: [DynamoDS/7] body: - type: textarea attributes: - label: 'Dynamo Version' + label: Dynamo Version description: | Which version of Dynamo are you using? Go to **Dynamo > About** if you are not sure. @@ -34,7 +34,7 @@ body: required: true - type: textarea attributes: - label: What did you see instead + label: What did you see instead? validations: required: true - type: textarea diff --git a/.github/workflows/move_issues.yml b/.github/workflows/move_issues.yml index c0aeaad78..a52d19fd7 100644 --- a/.github/workflows/move_issues.yml +++ b/.github/workflows/move_issues.yml @@ -5,14 +5,14 @@ name: Move Issues # Built-in workflow https://github.com/orgs/DynamoDS/projects/7/workflows # The built-in workflow -# - adds any new issues to DynamoRevitIssues project +# - adds any new issues to DynamoRevit Issues project # - sets status as 'Triage' when an item is added to the project # - sets status as 'Backlog' when an item is reopened # - sets status as 'Done' when an item is closed # 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 +# - transfers issues labeled as 'Dynamo' to 'DynamoDS/Dynamo' repository +# - transfers 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 @@ -26,27 +26,38 @@ env: GH_TOKEN: ${{ secrets.DYNAMO_ISSUES_TOKEN }} gh_organization: ${{ github.repository_owner }} project_id: 7 - project_name: 'DynamoRevit Issues' + project_name: DynamoRevit Issues jobs: - issue_labeled: - name: issue labeled + transfer_issue_labeled_as_dynamo: + name: Transfer issue labeled as Dynamo runs-on: ubuntu-latest - if: github.event.action == 'labeled' + if: ${{ github.event.action == 'labeled' }} steps: - uses: actions/checkout@v4 - - name: Move issue to Dynamo Repository + - name: Transfer issue to Dynamo Repository if: ${{ github.event.label.name == 'Dynamo' }} run: | gh issue edit ${{ github.event.issue.number }} --remove-project "${{ env.project_name }}" gh issue transfer ${{ github.event.issue.number }} DynamoDS/Dynamo - - name: Move issue to DynamoWishlist Repository + transfer_issue_labeled_as_wishlist: + name: Transfer issue labeled as Wishlist + runs-on: ubuntu-latest + if: ${{ github.event.action == 'labeled' }} + steps: + - uses: actions/checkout@v4 + - name: Transfer issue to DynamoWishlist Repository if: ${{ github.event.label.name == 'Wishlist' }} - run: | + run: | gh issue edit ${{ github.event.issue.number }} --remove-project "${{ env.project_name }}" gh issue transfer ${{ github.event.issue.number }} DynamoDS/DynamoWishlist + move_issue_labeled_as_tracked: + name: Move issue labeled as tracked + runs-on: ubuntu-latest + if: ${{ github.event.action == 'labeled' }} + steps: - name: Move issue to Todo - if : github.event.label.name == 'tracked' + if: ${{ github.event.label.name == 'tracked' }} uses: leonsteinhaeuser/project-beta-automations@v2.2.1 with: gh_token: ${{ env.GH_TOKEN }} @@ -54,9 +65,8 @@ jobs: project_id: ${{ env.project_id }} resource_node_id: ${{ github.event.issue.node_id }} status_value: Todo - - issue_assigned: - name: issue assigned + move_assigned_issue: + name: Move assigned issue runs-on: ubuntu-latest if: ${{ github.event.action == 'assigned' }} steps: