Skip to content

Commit b99e963

Browse files
committed
git command for traces added
1 parent 6fbb9a7 commit b99e963

1 file changed

Lines changed: 19 additions & 14 deletions

File tree

.github/workflows/change_impact.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ on:
55
types: [created]
66

77
jobs:
8-
run-change-impact:
8+
run-reqflow:
99
if: |
1010
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+
)
1215
runs-on: ubuntu-latest
13-
16+
1417
permissions:
1518
pull-requests: write
1619
issues: write
@@ -76,18 +79,20 @@ jobs:
7679
cp target/release/reqflow ./reqflow
7780
7881
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
8185
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.")
8496
echo "REQFLOW_OUTPUT<<EOF" >> $GITHUB_ENV
8597
echo "$OUTPUT" >> $GITHUB_ENV
8698
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

Comments
 (0)