Skip to content

Commit

Permalink
[#34] Move Project Automations to shared actions (#35)
Browse files Browse the repository at this point in the history
* [#34] Move Project Automations to shared actions

* [#34] Move Project Automations to shared actions
  • Loading branch information
mustafaozhan authored Nov 7, 2023
1 parent 9c8943f commit b8564bf
Showing 1 changed file with 4 additions and 56 deletions.
60 changes: 4 additions & 56 deletions .github/workflows/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,59 +14,7 @@ on:

jobs:
ProjectAutomations:
runs-on: ubuntu-latest
steps:
- name: 'Add issue to project'
if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'reopened')
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
organization: Oztechan
project_id: 6
resource_node_id: ${{ github.event.issue.node_id }}
operation_mode: custom_field
custom_field_values: '[{\"name\": \"Iteration\",\"type\": \"iteration\",\"value\": \"@current\"}]'

- name: 'Move Related Issue to "πŸ— PR Review"'
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'ready_for_review' || github.event.action == 'reopened')
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
organization: Oztechan
project_id: 6
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: "πŸ— PR Review"
move_related_issues: true

- name: 'Add Dependency PR by renovate to "πŸ— PR Review"'
if: github.event_name == 'pull_request' && github.event.pull_request.user.login == 'renovate[bot]' && (github.event.action == 'opened' || github.event.action == 'ready_for_review' || github.event.action == 'reopened')
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
organization: Oztechan
project_id: 6
resource_node_id: ${{ github.event.pull_request.node_id }}
operation_mode: custom_field
custom_field_values: '[{\"name\": \"Iteration\",\"type\": \"iteration\",\"value\": \"@current\"}]'

- name: 'Move Related Issue to "🚧 In Progress"'
if: github.event_name == 'pull_request' && github.event.action == 'converted_to_draft'
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
organization: Oztechan
project_id: 6
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: "🚧 In Progress"
move_related_issues: true

- name: 'Move Related Issue to "βœ… Done"'
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
organization: Oztechan
project_id: 6
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: "βœ… Done"
move_related_issues: true
uses: Oztechan/actions/.github/workflows/project.yml@6c5f8bec653f12c288d4bb6f82e3c4f1e0611f25
with:
project_id: 6
secrets: inherit

0 comments on commit b8564bf

Please sign in to comment.