Skip to content

feat: Merge prerelease into master #14

feat: Merge prerelease into master

feat: Merge prerelease into master #14

name: Project Automations
on:
issues:
types:
- opened
- reopened
- closed
- labeled
pull_request_target:
types:
- opened
env:
ice_box: 🧊 Ice Box
new: 🆕 New
ready: 🔖 Ready
on_deck: 📨 On Deck
todo: 📋 To Do
in_progress: 🏗 In progress
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 to Contribution Board
if: github.event.label.name == 'good first issue' || github.event.label.name == 'help wanted'
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\": \"Contributions\",\"type\": \"single_select\",\"value\": \"Yes\"}]'
- name: Move Issue to ${{ env.in_review }}
if: github.event.label.name == 'ready for review'
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.in_review }}
- 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\"}]'
- name: Add Issue Type - Epic
if: github.event.label.name == 'epic'
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\": \"⚓️ Epic\"}]'
- name: Add Issue Type - Spike
if: github.event.label.name == 'spike'
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\": \"🏐 Spike\"}]'
- name: Add Issue Type - Infrastructure
if: github.event.label.name == 'infra'
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\": \"🧰 Infrastructure\"}]'
pr_opened:
name: pr_opened
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target' && github.event.action == 'opened'
steps:
- name: Move PR to Current Sprint
if: startsWith(github.head_ref, 'merge/') || startsWith(github.head_ref, 'dependabot/')
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.pull_request.node_id }}
operation_mode: custom_field
custom_field_values: '[{\"name\": \"Priority\",\"type\": \"single_select\",\"value\": \"🌋 Urgent\"},{\"name\": \"Sprint\",\"type\": \"iteration\",\"value\": \"@current\"},{\"name\": \"Status\",\"type\": \"single_select\",\"value\": \"👀 In review\"}]'