Releases: maxim-lobanov/build-issue-dependencies-graph
v1.2.1
Full Changelog: v1.2.0...v1.2.1
Update Node.js to 20.x
Update Node.js to 20.x
Temporary disable clickable links
Temporary disable clickable links because of known issue with mermaid rendering
Fix bug with referencing unknown issue
What's Changed
- Fix bug with referencing unknown issue by @maxim-lobanov in #10
Full Changelog: v1.0.2...v1.0.3
Parse short issue links
What's Changed
- Implement parsing of short issue links by @maxim-lobanov in #9
- Fix broken mermaid if issue title contains double quotes symbol by @maxim-lobanov in #9
Full Changelog: v1...v1.0.2
Fix links rendering + minor improvements
Full Changelog: v1...v1.0.1
First release of action
maxim-lobanov/build-issue-dependencies-graph
This action is intended for building dependencies graph between issues in epic, rendering mermaid diagram with this graph and automatically updating epic issue body with diagram.
It can be useful during work on big epics where it is tricky to keep all dependencies in mind.
All nodes of diagram are clickable and link leads to issue page. Also nodes are colored according to issue status: Green (issue is closed), Yellow (issue is opened and someone is assigned to it), White (issue is opened and no assignees).
Parameters
Parameter | Description |
---|---|
root-issue-url |
Url of the root issue |
section-title |
Title of markdown section where mermaid chart should be placed |
github-token |
GitHub API Token with read and write access to root issue and read access to all issues in the tasklist |
include-legend |
Set this option to include legend to mermaid diagram |
include-finish-node |
Set this option to include finish node to mermaid diagram |
dry-run |
Set this option to not update root issue with updated mermaid diagram and only print new diagram to output |
Usage
-
Update root issue body to include task list with all children issues:
- [ ] https://github.com/owner/repo/issues/2 - [ ] https://github.com/owner/repo/issues/3 - [ ] https://github.com/owner/repo/issues/4 ...
-
Create an empty section in root issue body to which mermaid diagram will be inserted:
... ## Spec Diagram ...
-
Update all children issues to define their dependencies in issues body using one of the following syntax:
Depends on https://github.com/owner/repo/issues/2, https://github.com/owner/repo/issues/3 Depends on: https://github.com/owner/repo/issues/2 https://github.com/owner/repo/issues/3 Dependencies: https://github.com/owner/repo/issues/2, https://github.com/owner/repo/issues/3
Any of the format above can be used one or multiple times in issue body. Any separator can be used for issues in line.
-
Add workflow to invoke this action:
jobs: update-diagram: runs-on: ubuntu-latest steps: - uses: maxim-lobanov/build-issue-dependencies-graph@v1 with: root-issue-url: 'https://github.com/owner/repo/issues/1' section-title: 'Spec Diagram' github-token: '${{ secrets.GITHUB_TOKEN }}' include-legend: true include-finish-node: true
Advanced usage
Workflow to trigger action on schedule
on:
schedule:
- cron: '* */12 * * *' # Twice per day
jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- root-issue-url: 'https://github.com/owner/repo/issues/1'
section-title: 'Spec Diagram'
- root-issue-url: 'https://github.com/owner/repo/issues/2'
section-title: 'Spec Diagram'
steps:
- uses: maxim-lobanov/build-issue-dependencies-graph@v1
name: 'Build issues dependency graph'
id: build-issue-dependencies-graph
with:
root-issue-url: '${{ matrix.root-issue-url }}'
section-title: '${{ matrix.section-title }}'
github-token: '${{ secrets.GITHUB_TOKEN }}'
include-legend: true
include-finish-node: true
Workflow to trigger action manually
on:
workflow_dispatch:
inputs:
root-issue-url:
description: 'Root issue url'
required: true
type: string
section-title:
description: 'Section title'
required: true
type: string
include-legend:
description: 'Include legend'
type: boolean
include-finish-node:
description: 'Include finish node'
type: boolean
dry-run:
description: 'Dry run'
type: boolean
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: maxim-lobanov/build-issue-dependencies-graph@v1
name: 'Build issues dependency graph'
id: build-issue-dependencies-graph
with:
root-issue-url: '${{ github.event.inputs.root-issue-url }}'
section-title: '${{ github.event.inputs.section-title }}'
github-token: '${{ secrets.GITHUB_TOKEN }}'
include-legend: '${{ github.event.inputs.include-legend }}'
include-finish-node: '${{ github.event.inputs.include-finish-node }}'
dry-run: '${{ github.event.inputs.dry-run }}'
- run: |
cat << 'EOF' > $GITHUB_STEP_SUMMARY
${{ steps.build-issue-dependencies-graph.outputs.mermaid-diagram }}
EOF