Skip to content

Commit

Permalink
Extend project automation (#2598)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsangmeister authored Aug 3, 2023
1 parent 8409b1a commit 602b629
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 23 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/project-automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Project automation
on:
workflow_call:
inputs:
resource_node_id:
required: true
type: string
status_value:
required: true
type: string
secrets:
AUTOMATION_APP_ID:
required: true
AUTOMATION_APP_INSTALLATION_ID:
required: true
AUTOMATION_APP_PRIVATE_KEY:
required: true

jobs:
workflow_call:
name: Set status
runs-on: ubuntu-latest
steps:
- uses: leonsteinhaeuser/[email protected]
with:
gh_app_ID: ${{ secrets.AUTOMATION_APP_ID }}
gh_app_installation_ID: ${{ secrets.AUTOMATION_APP_INSTALLATION_ID }}
gh_app_secret_key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }}
organization: OpenSlides
project_id: 2
resource_node_id: ${{ inputs.resource_node_id }}
status_value: ${{ inputs.status_value }}
14 changes: 14 additions & 0 deletions .github/workflows/project-issue-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Project automation
on:
issues:
types:
- closed

jobs:
issue_closed:
name: Issue closed
uses: ./.github/workflows/project-automation.yml
secrets: inherit
with:
resource_node_id: ${{ github.event.issue.node_id }}
status_value: "Done"
15 changes: 15 additions & 0 deletions .github/workflows/project-issue-opened.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Project automation
on:
issues:
types:
- opened
- reopened

jobs:
issue_opened:
name: Issue opened
uses: ./.github/workflows/project-automation.yml
secrets: inherit
with:
resource_node_id: ${{ github.event.issue.node_id }}
status_value: "Backlog"
14 changes: 14 additions & 0 deletions .github/workflows/project-pull-request-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Project automation
on:
pull_request_target:
types:
- closed

jobs:
pull_request_closed:
name: Pull request closed
uses: ./.github/workflows/project-automation.yml
secrets: inherit
with:
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: "Done"
15 changes: 15 additions & 0 deletions .github/workflows/project-pull-request-opened.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Project automation
on:
pull_request_target:
types:
- opened
- reopened

jobs:
pull_request_opened:
name: Pull request opened
uses: ./.github/workflows/project-automation.yml
secrets: inherit
with:
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: "Work in progress"
14 changes: 14 additions & 0 deletions .github/workflows/project-pull-request-review-requested.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Project automation
on:
pull_request_target:
types:
- review_requested

jobs:
pull_request_review_requested:
name: Pull request review requested
uses: ./.github/workflows/project-automation.yml
secrets: inherit
with:
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: "Review in progress"
23 changes: 0 additions & 23 deletions .github/workflows/set-project.yml

This file was deleted.

0 comments on commit 602b629

Please sign in to comment.