-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add workflow for project board (#104)
Adding the workflow for the Canvas Project Board to automatically add issues to the project [category:Infrastructure]
- Loading branch information
1 parent
9d1a2a7
commit 06af676
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Project Automations | ||
on: | ||
issues: | ||
types: | ||
- opened | ||
- reopened | ||
- closed | ||
- labeled | ||
|
||
env: | ||
new: 🆕 New | ||
in_review: 👀 In review | ||
done: ✅ Done | ||
gh_project_token: ${{ secrets.CANVAS_BOARD_TOKEN }} | ||
gh_organization: Workday | ||
gh_project_id: 4 | ||
|
||
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.new }} | ||
uses: leonsteinhaeuser/[email protected] | ||
with: | ||
gh_token: ${{ env.gh_project_token }} | ||
organization: ${{ env.gh_organization }} | ||
project_id: ${{ env.gh_project_id }} | ||
resource_node_id: ${{ github.event.issue.node_id }} | ||
status_value: ${{ env.new }} | ||
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/[email protected] | ||
with: | ||
gh_token: ${{ env.gh_project_token }} | ||
organization: ${{ env.gh_organization }} | ||
project_id: ${{ env.gh_project_id }} | ||
resource_node_id: ${{ github.event.issue.node_id }} | ||
status_value: ${{ env.done }} | ||
issue_labeled: | ||
name: issue_labeled | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'issues' && github.event.action == 'labeled' | ||
steps: | ||
- name: Add Issue Type - Bug | ||
if: github.event.label.name == 'bug' | ||
uses: leonsteinhaeuser/[email protected] | ||
with: | ||
gh_token: ${{ env.gh_project_token }} | ||
organization: ${{ env.gh_organization }} | ||
project_id: ${{ env.gh_project_id }} | ||
resource_node_id: ${{ github.event.issue.node_id }} | ||
operation_mode: custom_field | ||
custom_field_values: '[{\"name\": \"Type\",\"type\": \"single_select\",\"value\": \"🐛 Bug\"}]' |