Skip to content

Commit

Permalink
DYN-6172 Add issues workflow (#2957)
Browse files Browse the repository at this point in the history
Co-authored-by: kca <[email protected]>
  • Loading branch information
avidit and avidit authored Aug 29, 2023
1 parent fe22ec8 commit 1afd422
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Issues workflow
# DynamoRevitIssues project (https://github.com/orgs/DynamoDS/projects/7)
# Built-in workflow https://github.com/orgs/DynamoDS/projects/7/workflows/11382076

# The built in workflow
# - automatically adds any new issues to DynamoRevitIssues 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 'tracked' to 'Todo' column the project
# - moves assigned issues to 'In Progress' column the project

on:
issues:
types:
- labeled
- assigned

env:
gh_token: ${{ secrets.DYNAMOBOTTOKEN }}
gh_organization: DynamoDS
project_id: 7

jobs:
issue_labeled:
name: issue labeled
runs-on: ubuntu-latest
if: github.event_name == 'issues' && github.event.action == 'labeled'
steps:
- name: Move issue to Dynamo Repository
if: github.event.label.name == 'Dynamo'
run: gh issue transfer ${{ github.event.issue.number }} DynamoDS/Dynamo
env:
GITHUB_TOKEN: ${{ env.gh_token }}
- name: Move issue to Todo
if : github.event.label.name == 'tracked'
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ env.gh_token }}
organization: ${{ env.gh_organization }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.issue.node_id }}
status_value: Todo

issue_assigned:
name: issue assigned
runs-on: ubuntu-latest
if: github.event_name == 'issues' && github.event.action == 'assigned'
steps:
- name: Move issue to In Progress
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ env.gh_token }}
organization: ${{ env.gh_organization }}
project_id: ${{ env.project_id }}
resource_node_id: ${{ github.event.issue.node_id }}
status_value: In Progress

0 comments on commit 1afd422

Please sign in to comment.