Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Update CI files
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pulpbot authored and fao89 committed Sep 13, 2022
1 parent 92e8140 commit 5a5a183
Showing 1 changed file with 103 additions and 0 deletions.
103 changes: 103 additions & 0 deletions .github/workflows/kanban.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
# './plugin-template --github pulp_2to3_migration' to update this file.
#
# For more info visit https://github.com/pulp/plugin_template
# Manage issues in a project board using https://github.com/leonsteinhaeuser/project-beta-automations

---
name: Kanban
on:
pull_request_target:
issues:
types:
- labeled
- reopened
- assigned
- closed

env:
free_to_take: Free to take
in_progress: In Progress
needs_review: Needs review
done: Done

jobs:
# only prio-list labeled items should be added to the board
add-to-project-board:
if: github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'prio-list') && contains(fromJson('["labeled", "reopened"]'), github.event.action)
runs-on: ubuntu-latest
steps:
- name: Add issue to Free-to-take list
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.RELEASE_TOKEN }}
organization: pulp
project_id: 8
resource_node_id: ${{ github.event.issue.node_id }}
operation_mode: status
status_value: ${{ env.free_to_take }} # Target status

move-to-inprogress:
if: github.event_name == 'issues' && github.event.action == 'assigned'
runs-on: ubuntu-latest
steps:
- name: Move an issue to the In Progress column
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.RELEASE_TOKEN }}
organization: pulp
project_id: 8
resource_node_id: ${{ github.event.issue.node_id }}
operation_mode: status
status_value: ${{ env.in_progress }} # Target status

find-linked-issues:
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
name: Find issues linked to a PR
outputs:
linked-issues: ${{ steps.linked-issues.outputs.issues }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get Linked Issues Action
uses: kin/[email protected]
id: linked-issues
with:
access-token: ${{ secrets.RELEASE_TOKEN }}

move-to-needs-review:
if: github.event_name == 'pull_request_target' && contains(fromJson(needs.find-linked-issues.outputs.linked-issues).*.issue.state, 'open')
runs-on: ubuntu-latest
name: Move linked issues to Needs Review
needs: find-linked-issues
strategy:
max-parallel: 3
matrix:
issues: ${{ fromJSON(needs.find-linked-issues.outputs.linked-issues) }}
steps:
- name: Move to Needs Review
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.RELEASE_TOKEN }}
organization: pulp
project_id: 8
resource_node_id: ${{ matrix.issues.issue.node_id }}
operation_mode: status
status_value: ${{ env.needs_review }} # Target status

move-to-done:
if: github.event_name == 'issues' && github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- name: Move an issue to the Done column
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.RELEASE_TOKEN }}
organization: pulp
project_id: 8
resource_node_id: ${{ github.event.issue.node_id }}
operation_mode: status
status_value: ${{ env.done }} # Target status

0 comments on commit 5a5a183

Please sign in to comment.