33This 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.
44It can be useful during work on big epics where it is tricky to keep all dependencies in mind.
55
6+ 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).
7+
68## Parameters
79| Parameter | Description |
810| -| -|
@@ -53,6 +55,35 @@ It can be useful during work on big epics where it is tricky to keep all depende
5355
5456## Advanced usage
5557
58+ ### Workflow to trigger action on schedule
59+ ```
60+ on:
61+ schedule:
62+ - cron: '* * /12 * * * ' # Twice per day
63+
64+ jobs:
65+ run:
66+ runs-on: ubuntu-latest
67+ strategy:
68+ fail-fast: false
69+ matrix:
70+ include:
71+ - root-issue-url: 'https://github.com/owner/repo/issues/1 '
72+ section-title: 'Spec Diagram'
73+ - root-issue-url: 'https://github.com/owner/repo/issues/2 '
74+ section-title: 'Spec Diagram'
75+ steps:
76+ - uses: maxim-lobanov/build-issue-dependencies-graph@v1
77+ name: 'Build issues dependency graph'
78+ id: build-issue-dependencies-graph
79+ with:
80+ root-issue-url: '${{ matrix.root-issue-url }}'
81+ section-title: '${{ matrix.section-title }}'
82+ github-token: '${{ secrets.GITHUB_TOKEN }}'
83+ include-legend: true
84+ include-finish-node: true
85+ ```
86+
5687### Workflow to trigger action manually
5788```yml
5889on:
@@ -80,48 +111,23 @@ jobs:
80111 run:
81112 runs-on: ubuntu-latest
82113 steps:
83- - uses: maxim-lobanov/build-issue-dependencies-graph@v1
84- name: 'Build issues dependency graph'
85- id: build-issue-dependencies-graph
86- with:
87- root-issue-url: '${{ github.event.inputs.root-issue-url }}'
88- section-title: '${{ github.event.inputs.section-title }}'
89- github-token: '${{ secrets.GITHUB_TOKEN }}'
90- include-legend: '${{ github.event.inputs.include-legend }}'
91- include-finish-node: '${{ github.event.inputs.include-finish-node }}'
92- dry-run: '${{ github.event.inputs.dry-run }}'
114+ - uses: maxim-lobanov/build-issue-dependencies-graph@v1
115+ name: 'Build issues dependency graph'
116+ id: build-issue-dependencies-graph
117+ with:
118+ root-issue-url: '${{ github.event.inputs.root-issue-url }}'
119+ section-title: '${{ github.event.inputs.section-title }}'
120+ github-token: '${{ secrets.GITHUB_TOKEN }}'
121+ include-legend: '${{ github.event.inputs.include-legend }}'
122+ include-finish-node: '${{ github.event.inputs.include-finish-node }}'
123+ dry-run: '${{ github.event.inputs.dry-run }}'
124+
125+ - run: |
126+ cat << 'EOF' > $GITHUB_STEP_SUMMARY
127+ ${{ steps.build-issue-dependencies-graph.outputs.mermaid-diagram }}
128+ EOF
93129```
94130
95- ### Workflow to trigger action on schedule
96- ```
97- on:
98- schedule:
99- - cron: '* */12 * * *' # Twice per day
100-
101- jobs:
102- run:
103- runs-on: ubuntu-latest
104- strategy:
105- fail-fast: false
106- matrix:
107- include:
108- - root-issue-url: 'https://github.com/owner/repo/issues/1'
109- section-title: 'Spec Diagram'
110- - root-issue-url: 'https://github.com/owner/repo/issues/2'
111- section-title: 'Spec Diagram'
112- steps:
113- - uses: maxim-lobanov/build-issue-dependencies-graph@v1
114- name: 'Build issues dependency graph'
115- id: build-issue-dependencies-graph
116- with:
117- root-issue-url: '${{ github.event.inputs.root-issue-url }}'
118- section-title: '${{ github.event.inputs.section-title }}'
119- github-token: '${{ secrets.GITHUB_TOKEN }}'
120- include-legend: true
121- include-finish-node: true
122- ```
123-
124-
125131## Mermaid examples
126132
127133``` mermaid
@@ -159,9 +165,21 @@ click issue1488484564 href "https://github.com/maxim-lobanov/build-issue-depende
159165issue1488484695("[TEST ISSUE] Child issue 2"):::completed;
160166click issue1488484695 href "https://github.com/maxim-lobanov/build-issue-dependencies-graph/issues/3" _blank;
161167
162- issue1488484833("[TEST ISSUE] Child issue 3"):::notstarted ;
168+ issue1488484833("[TEST ISSUE] Child issue 3"):::completed ;
163169click issue1488484833 href "https://github.com/maxim-lobanov/build-issue-dependencies-graph/issues/4" _blank;
164170
171+ issue1524488391("[TEST ISSUE] Child issue 4"):::completed;
172+ click issue1524488391 href "https://github.com/maxim-lobanov/build-issue-dependencies-graph/issues/5" _blank;
173+
174+ issue1524488450("[TEST ISSUE] Child issue 5"):::completed;
175+ click issue1524488450 href "https://github.com/maxim-lobanov/build-issue-dependencies-graph/issues/6" _blank;
176+
177+ issue1524488472("[TEST ISSUE] Child issue 6"):::notstarted;
178+ click issue1524488472 href "https://github.com/maxim-lobanov/build-issue-dependencies-graph/issues/7" _blank;
179+
180+ issue1524488513("[TEST ISSUE] Child issue 7"):::notstarted;
181+ click issue1524488513 href "https://github.com/maxim-lobanov/build-issue-dependencies-graph/issues/8" _blank;
182+
165183finish("Finish"):::notstarted;
166184
167185%% </Issues>
@@ -171,9 +189,16 @@ finish("Finish"):::notstarted;
171189
172190start --> issue1488484564;
173191start --> issue1488484695;
192+ start --> issue1524488391;
193+ start --> issue1524488450;
174194issue1488484564 --> issue1488484833;
175195issue1488484695 --> issue1488484833;
176- issue1488484833 --> finish;
196+ issue1488484833 --> issue1524488472;
197+ issue1524488450 --> issue1524488472;
198+ issue1524488450 --> issue1524488513;
199+ issue1524488391 --> finish;
200+ issue1524488472 --> finish;
201+ issue1524488513 --> finish;
177202
178203%% </Dependencies>
179204
0 commit comments