|
5 | 5 | types: [created] |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - run-change-impact: |
| 8 | + run-reqflow: |
9 | 9 | if: | |
10 | 10 | github.event.issue.pull_request != null && |
11 | | - contains(github.event.comment.body, '/reqflow impact') |
| 11 | + ( |
| 12 | + contains(github.event.comment.body, '/reqflow impact') || |
| 13 | + contains(github.event.comment.body, '/reqflow traces') |
| 14 | + ) |
12 | 15 | runs-on: ubuntu-latest |
13 | | - |
| 16 | + |
14 | 17 | permissions: |
15 | 18 | pull-requests: write |
16 | 19 | issues: write |
@@ -76,18 +79,20 @@ jobs: |
76 | 79 | cp target/release/reqflow ./reqflow |
77 | 80 |
|
78 | 81 |
|
79 | | - - name: Run ReqFlow Change Impact against PR base |
80 | | - id: run_reqflow |
| 82 | + - name: Run ReqFlow Impact (if triggered) |
| 83 | + if: contains(github.event.comment.body, '/reqflow impact') |
| 84 | + id: run_impact |
81 | 85 | run: | |
82 | | - mkdir output |
83 | | - OUTPUT=$(./reqflow --change-impact --git-commit "$BASE_COMMIT" 2>&1 || echo "⚠️ reqflow failed.") |
| 86 | + OUTPUT=$(./reqflow --change-impact --git-commit "$BASE_COMMIT" 2>&1 || echo "⚠️ reqflow impact failed.") |
| 87 | + echo "REQFLOW_OUTPUT<<EOF" >> $GITHUB_ENV |
| 88 | + echo "$OUTPUT" >> $GITHUB_ENV |
| 89 | + echo "EOF" >> $GITHUB_ENV |
| 90 | +
|
| 91 | + - name: Run ReqFlow Traces (if triggered) |
| 92 | + if: contains(github.event.comment.body, '/reqflow traces') |
| 93 | + id: run_traces |
| 94 | + run: | |
| 95 | + OUTPUT=$(./reqflow --traces --output-format markdown 2>&1 || echo "⚠️ reqflow traces failed.") |
84 | 96 | echo "REQFLOW_OUTPUT<<EOF" >> $GITHUB_ENV |
85 | 97 | echo "$OUTPUT" >> $GITHUB_ENV |
86 | 98 | echo "EOF" >> $GITHUB_ENV |
87 | | - |
88 | | - - name: Comment on PR with result |
89 | | - uses: peter-evans/create-or-update-comment@v3 |
90 | | - with: |
91 | | - issue-number: ${{ github.event.issue.number }} |
92 | | - body: | |
93 | | - ${{ env.REQFLOW_OUTPUT }} |
|
0 commit comments