@diff-review-system/drs 4.0.0-rc.4 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/agents/describe/pr-describer.md +14 -0
- package/.pi/agents/review/unified-reviewer.md +31 -1
- package/.pi/agents/task/agents-md-updater.md +3 -1
- package/.pi/agents/task/review-issue-fixer.md +18 -1
- package/.pi/agents/visual/pr-explainer.md +205 -0
- package/.pi/workflows/github-pr-describe.yaml +10 -7
- package/.pi/workflows/github-pr-fix-review-issues-stacked.yaml +148 -0
- package/.pi/workflows/github-pr-post-comment.yaml +10 -10
- package/.pi/workflows/github-pr-review-post.yaml +19 -8
- package/.pi/workflows/github-pr-review.yaml +348 -7
- package/.pi/workflows/github-pr-show-changes.yaml +8 -8
- package/.pi/workflows/github-pr-update-agents-md-stacked.yaml +103 -0
- package/.pi/workflows/github-pr-visual-explain.yaml +35 -0
- package/.pi/workflows/gitlab-mr-describe.yaml +8 -5
- package/.pi/workflows/gitlab-mr-fix-review-issues-stacked.yaml +144 -0
- package/.pi/workflows/gitlab-mr-post-comment.yaml +8 -8
- package/.pi/workflows/gitlab-mr-review.yaml +348 -5
- package/.pi/workflows/gitlab-mr-show-changes.yaml +6 -6
- package/.pi/workflows/gitlab-mr-update-agents-md-stacked.yaml +100 -0
- package/.pi/workflows/gitlab-mr-visual-explain.yaml +33 -0
- package/.pi/workflows/local-fix-review-issues.yaml +82 -13
- package/.pi/workflows/local-review.yaml +9 -2
- package/.pi/workflows/local-update-agents-md.yaml +1 -1
- package/.pi/workflows/local-visual-explain.yaml +31 -0
- package/.pi/workflows/release-changelog-finalize.yaml +47 -0
- package/.pi/workflows/tag-changelog-update.yaml +4 -4
- package/README.md +91 -27
- package/dist/ci/runner.d.ts.map +1 -1
- package/dist/ci/runner.js +3 -1
- package/dist/ci/runner.js.map +1 -1
- package/dist/cli/index.js +48 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/run-agent.d.ts +2 -0
- package/dist/cli/run-agent.d.ts.map +1 -1
- package/dist/cli/run-agent.js +4 -0
- package/dist/cli/run-agent.js.map +1 -1
- package/dist/cli/workflow.d.ts +56 -2
- package/dist/cli/workflow.d.ts.map +1 -1
- package/dist/cli/workflow.js +2165 -85
- package/dist/cli/workflow.js.map +1 -1
- package/dist/github/client.d.ts +12 -0
- package/dist/github/client.d.ts.map +1 -1
- package/dist/github/client.js +27 -0
- package/dist/github/client.js.map +1 -1
- package/dist/github/platform-adapter.d.ts +6 -1
- package/dist/github/platform-adapter.d.ts.map +1 -1
- package/dist/github/platform-adapter.js +84 -8
- package/dist/github/platform-adapter.js.map +1 -1
- package/dist/gitlab/client.d.ts +11 -0
- package/dist/gitlab/client.d.ts.map +1 -1
- package/dist/gitlab/client.js +11 -0
- package/dist/gitlab/client.js.map +1 -1
- package/dist/gitlab/platform-adapter.d.ts +3 -1
- package/dist/gitlab/platform-adapter.d.ts.map +1 -1
- package/dist/gitlab/platform-adapter.js +32 -1
- package/dist/gitlab/platform-adapter.js.map +1 -1
- package/dist/lib/comment-formatter.d.ts +8 -0
- package/dist/lib/comment-formatter.d.ts.map +1 -1
- package/dist/lib/comment-formatter.js +12 -4
- package/dist/lib/comment-formatter.js.map +1 -1
- package/dist/lib/comment-poster.d.ts.map +1 -1
- package/dist/lib/comment-poster.js +28 -1
- package/dist/lib/comment-poster.js.map +1 -1
- package/dist/lib/config.d.ts +50 -11
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +163 -28
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/context-compression.d.ts +10 -0
- package/dist/lib/context-compression.d.ts.map +1 -1
- package/dist/lib/context-compression.js +101 -13
- package/dist/lib/context-compression.js.map +1 -1
- package/dist/lib/context-loader.d.ts +2 -1
- package/dist/lib/context-loader.d.ts.map +1 -1
- package/dist/lib/context-loader.js +70 -1
- package/dist/lib/context-loader.js.map +1 -1
- package/dist/lib/describe-core.d.ts.map +1 -1
- package/dist/lib/describe-core.js +3 -2
- package/dist/lib/describe-core.js.map +1 -1
- package/dist/lib/diff-lines.d.ts +9 -0
- package/dist/lib/diff-lines.d.ts.map +1 -1
- package/dist/lib/diff-lines.js +17 -9
- package/dist/lib/diff-lines.js.map +1 -1
- package/dist/lib/exit.js +4 -4
- package/dist/lib/exit.js.map +1 -1
- package/dist/lib/html-artifact.d.ts +14 -0
- package/dist/lib/html-artifact.d.ts.map +1 -0
- package/dist/lib/html-artifact.js +59 -0
- package/dist/lib/html-artifact.js.map +1 -0
- package/dist/lib/issue-parser.js +3 -3
- package/dist/lib/issue-parser.js.map +1 -1
- package/dist/lib/json-output-schema.d.ts +70 -0
- package/dist/lib/json-output-schema.d.ts.map +1 -1
- package/dist/lib/json-output-schema.js +40 -0
- package/dist/lib/json-output-schema.js.map +1 -1
- package/dist/lib/platform-client.d.ts +26 -0
- package/dist/lib/platform-client.d.ts.map +1 -1
- package/dist/lib/review-artifact.d.ts +69 -0
- package/dist/lib/review-artifact.d.ts.map +1 -0
- package/dist/lib/review-artifact.js +171 -0
- package/dist/lib/review-artifact.js.map +1 -0
- package/dist/lib/review-core.d.ts +6 -4
- package/dist/lib/review-core.d.ts.map +1 -1
- package/dist/lib/review-core.js +71 -151
- package/dist/lib/review-core.js.map +1 -1
- package/dist/lib/review-orchestrator.d.ts +23 -0
- package/dist/lib/review-orchestrator.d.ts.map +1 -1
- package/dist/lib/review-orchestrator.js +20 -13
- package/dist/lib/review-orchestrator.js.map +1 -1
- package/dist/lib/review-usage.d.ts +4 -0
- package/dist/lib/review-usage.d.ts.map +1 -1
- package/dist/lib/review-usage.js +25 -0
- package/dist/lib/review-usage.js.map +1 -1
- package/dist/lib/trace-collector.d.ts +105 -0
- package/dist/lib/trace-collector.d.ts.map +1 -0
- package/dist/lib/trace-collector.js +255 -0
- package/dist/lib/trace-collector.js.map +1 -0
- package/dist/lib/trace-html.d.ts +3 -0
- package/dist/lib/trace-html.d.ts.map +1 -0
- package/dist/lib/trace-html.js +349 -0
- package/dist/lib/trace-html.js.map +1 -0
- package/dist/lib/workflow-artifacts.d.ts +54 -0
- package/dist/lib/workflow-artifacts.d.ts.map +1 -0
- package/dist/lib/workflow-artifacts.js +150 -0
- package/dist/lib/workflow-artifacts.js.map +1 -0
- package/dist/pi/sdk.d.ts.map +1 -1
- package/dist/pi/sdk.js +570 -6
- package/dist/pi/sdk.js.map +1 -1
- package/dist/runtime/agent-loader.js +2 -2
- package/dist/runtime/client.d.ts +2 -0
- package/dist/runtime/client.d.ts.map +1 -1
- package/dist/runtime/client.js +11 -5
- package/dist/runtime/client.js.map +1 -1
- package/package.json +21 -15
- package/.pi/workflows/github-pr-describe-post.yaml +0 -24
- package/.pi/workflows/gitlab-mr-describe-post.yaml +0 -22
- package/.pi/workflows/gitlab-mr-review-code-quality.yaml +0 -31
- package/.pi/workflows/gitlab-mr-review-post-code-quality.yaml +0 -40
- package/.pi/workflows/gitlab-mr-review-post.yaml +0 -30
- package/.pi/workflows/local-staged-review.yaml +0 -17
- package/dist/cli/run-agent.test.d.ts +0 -2
- package/dist/cli/run-agent.test.d.ts.map +0 -1
- package/dist/cli/run-agent.test.js +0 -204
- package/dist/cli/run-agent.test.js.map +0 -1
- package/dist/cli/workflow.test.d.ts +0 -2
- package/dist/cli/workflow.test.d.ts.map +0 -1
- package/dist/cli/workflow.test.js +0 -1410
- package/dist/cli/workflow.test.js.map +0 -1
- package/dist/github/client.test.d.ts +0 -2
- package/dist/github/client.test.d.ts.map +0 -1
- package/dist/github/client.test.js +0 -206
- package/dist/github/client.test.js.map +0 -1
- package/dist/github/platform-adapter.test.d.ts +0 -2
- package/dist/github/platform-adapter.test.d.ts.map +0 -1
- package/dist/github/platform-adapter.test.js +0 -40
- package/dist/github/platform-adapter.test.js.map +0 -1
- package/dist/gitlab/diff-parser.test.d.ts +0 -2
- package/dist/gitlab/diff-parser.test.d.ts.map +0 -1
- package/dist/gitlab/diff-parser.test.js +0 -315
- package/dist/gitlab/diff-parser.test.js.map +0 -1
- package/dist/gitlab/platform-adapter.test.d.ts +0 -2
- package/dist/gitlab/platform-adapter.test.d.ts.map +0 -1
- package/dist/gitlab/platform-adapter.test.js +0 -21
- package/dist/gitlab/platform-adapter.test.js.map +0 -1
- package/dist/index.test.d.ts +0 -2
- package/dist/index.test.d.ts.map +0 -1
- package/dist/index.test.js +0 -7
- package/dist/index.test.js.map +0 -1
- package/dist/lib/code-quality-report.test.d.ts +0 -2
- package/dist/lib/code-quality-report.test.d.ts.map +0 -1
- package/dist/lib/code-quality-report.test.js +0 -327
- package/dist/lib/code-quality-report.test.js.map +0 -1
- package/dist/lib/comment-formatter.test.d.ts +0 -2
- package/dist/lib/comment-formatter.test.d.ts.map +0 -1
- package/dist/lib/comment-formatter.test.js +0 -727
- package/dist/lib/comment-formatter.test.js.map +0 -1
- package/dist/lib/comment-manager.test.d.ts +0 -2
- package/dist/lib/comment-manager.test.d.ts.map +0 -1
- package/dist/lib/comment-manager.test.js +0 -680
- package/dist/lib/comment-manager.test.js.map +0 -1
- package/dist/lib/comment-poster.test.d.ts +0 -5
- package/dist/lib/comment-poster.test.d.ts.map +0 -1
- package/dist/lib/comment-poster.test.js +0 -255
- package/dist/lib/comment-poster.test.js.map +0 -1
- package/dist/lib/config-model-overrides.test.d.ts +0 -2
- package/dist/lib/config-model-overrides.test.d.ts.map +0 -1
- package/dist/lib/config-model-overrides.test.js +0 -218
- package/dist/lib/config-model-overrides.test.js.map +0 -1
- package/dist/lib/config.test.d.ts +0 -2
- package/dist/lib/config.test.d.ts.map +0 -1
- package/dist/lib/config.test.js +0 -353
- package/dist/lib/config.test.js.map +0 -1
- package/dist/lib/context-compression.test.d.ts +0 -2
- package/dist/lib/context-compression.test.d.ts.map +0 -1
- package/dist/lib/context-compression.test.js +0 -337
- package/dist/lib/context-compression.test.js.map +0 -1
- package/dist/lib/context-loader.test.d.ts +0 -2
- package/dist/lib/context-loader.test.d.ts.map +0 -1
- package/dist/lib/context-loader.test.js +0 -212
- package/dist/lib/context-loader.test.js.map +0 -1
- package/dist/lib/cursor-fix-link.test.d.ts +0 -2
- package/dist/lib/cursor-fix-link.test.d.ts.map +0 -1
- package/dist/lib/cursor-fix-link.test.js +0 -70
- package/dist/lib/cursor-fix-link.test.js.map +0 -1
- package/dist/lib/describe-core.test.d.ts +0 -2
- package/dist/lib/describe-core.test.d.ts.map +0 -1
- package/dist/lib/describe-core.test.js +0 -208
- package/dist/lib/describe-core.test.js.map +0 -1
- package/dist/lib/describe-output-path.test.d.ts +0 -2
- package/dist/lib/describe-output-path.test.d.ts.map +0 -1
- package/dist/lib/describe-output-path.test.js +0 -51
- package/dist/lib/describe-output-path.test.js.map +0 -1
- package/dist/lib/describe-parser.test.d.ts +0 -2
- package/dist/lib/describe-parser.test.d.ts.map +0 -1
- package/dist/lib/describe-parser.test.js +0 -282
- package/dist/lib/describe-parser.test.js.map +0 -1
- package/dist/lib/description-executor.test.d.ts +0 -2
- package/dist/lib/description-executor.test.d.ts.map +0 -1
- package/dist/lib/description-executor.test.js +0 -135
- package/dist/lib/description-executor.test.js.map +0 -1
- package/dist/lib/description-formatter.test.d.ts +0 -2
- package/dist/lib/description-formatter.test.d.ts.map +0 -1
- package/dist/lib/description-formatter.test.js +0 -57
- package/dist/lib/description-formatter.test.js.map +0 -1
- package/dist/lib/diff-lines.test.d.ts +0 -2
- package/dist/lib/diff-lines.test.d.ts.map +0 -1
- package/dist/lib/diff-lines.test.js +0 -13
- package/dist/lib/diff-lines.test.js.map +0 -1
- package/dist/lib/diff-parser.test.d.ts +0 -2
- package/dist/lib/diff-parser.test.d.ts.map +0 -1
- package/dist/lib/diff-parser.test.js +0 -335
- package/dist/lib/diff-parser.test.js.map +0 -1
- package/dist/lib/error-comment-poster.test.d.ts +0 -2
- package/dist/lib/error-comment-poster.test.d.ts.map +0 -1
- package/dist/lib/error-comment-poster.test.js +0 -128
- package/dist/lib/error-comment-poster.test.js.map +0 -1
- package/dist/lib/exit.test.d.ts +0 -2
- package/dist/lib/exit.test.d.ts.map +0 -1
- package/dist/lib/exit.test.js +0 -120
- package/dist/lib/exit.test.js.map +0 -1
- package/dist/lib/issue-parser.test.d.ts +0 -2
- package/dist/lib/issue-parser.test.d.ts.map +0 -1
- package/dist/lib/issue-parser.test.js +0 -281
- package/dist/lib/issue-parser.test.js.map +0 -1
- package/dist/lib/json-output-schema.test.d.ts +0 -2
- package/dist/lib/json-output-schema.test.d.ts.map +0 -1
- package/dist/lib/json-output-schema.test.js +0 -92
- package/dist/lib/json-output-schema.test.js.map +0 -1
- package/dist/lib/json-output.test.d.ts +0 -2
- package/dist/lib/json-output.test.d.ts.map +0 -1
- package/dist/lib/json-output.test.js +0 -141
- package/dist/lib/json-output.test.js.map +0 -1
- package/dist/lib/logger.test.d.ts +0 -2
- package/dist/lib/logger.test.d.ts.map +0 -1
- package/dist/lib/logger.test.js +0 -324
- package/dist/lib/logger.test.js.map +0 -1
- package/dist/lib/position-validator.test.d.ts +0 -2
- package/dist/lib/position-validator.test.d.ts.map +0 -1
- package/dist/lib/position-validator.test.js +0 -128
- package/dist/lib/position-validator.test.js.map +0 -1
- package/dist/lib/prompt-budget.test.d.ts +0 -2
- package/dist/lib/prompt-budget.test.d.ts.map +0 -1
- package/dist/lib/prompt-budget.test.js +0 -55
- package/dist/lib/prompt-budget.test.js.map +0 -1
- package/dist/lib/repository-validator.test.d.ts +0 -5
- package/dist/lib/repository-validator.test.d.ts.map +0 -1
- package/dist/lib/repository-validator.test.js +0 -341
- package/dist/lib/repository-validator.test.js.map +0 -1
- package/dist/lib/review-core.test.d.ts +0 -2
- package/dist/lib/review-core.test.d.ts.map +0 -1
- package/dist/lib/review-core.test.js +0 -614
- package/dist/lib/review-core.test.js.map +0 -1
- package/dist/lib/review-orchestrator.test.d.ts +0 -2
- package/dist/lib/review-orchestrator.test.d.ts.map +0 -1
- package/dist/lib/review-orchestrator.test.js +0 -552
- package/dist/lib/review-orchestrator.test.js.map +0 -1
- package/dist/lib/review-output-path.test.d.ts +0 -2
- package/dist/lib/review-output-path.test.d.ts.map +0 -1
- package/dist/lib/review-output-path.test.js +0 -83
- package/dist/lib/review-output-path.test.js.map +0 -1
- package/dist/lib/review-parser.test.d.ts +0 -2
- package/dist/lib/review-parser.test.d.ts.map +0 -1
- package/dist/lib/review-parser.test.js +0 -130
- package/dist/lib/review-parser.test.js.map +0 -1
- package/dist/lib/review-usage.test.d.ts +0 -2
- package/dist/lib/review-usage.test.d.ts.map +0 -1
- package/dist/lib/review-usage.test.js +0 -83
- package/dist/lib/review-usage.test.js.map +0 -1
- package/dist/lib/unified-review-executor.d.ts +0 -58
- package/dist/lib/unified-review-executor.d.ts.map +0 -1
- package/dist/lib/unified-review-executor.js +0 -201
- package/dist/lib/unified-review-executor.js.map +0 -1
- package/dist/lib/unified-review-executor.test.d.ts +0 -5
- package/dist/lib/unified-review-executor.test.d.ts.map +0 -1
- package/dist/lib/unified-review-executor.test.js +0 -472
- package/dist/lib/unified-review-executor.test.js.map +0 -1
- package/dist/lib/write-json-output.test.d.ts +0 -2
- package/dist/lib/write-json-output.test.d.ts.map +0 -1
- package/dist/lib/write-json-output.test.js +0 -259
- package/dist/lib/write-json-output.test.js.map +0 -1
- package/dist/pi/sdk.test.d.ts +0 -2
- package/dist/pi/sdk.test.d.ts.map +0 -1
- package/dist/pi/sdk.test.js +0 -488
- package/dist/pi/sdk.test.js.map +0 -1
- package/dist/runtime/agent-loader.test.d.ts +0 -2
- package/dist/runtime/agent-loader.test.d.ts.map +0 -1
- package/dist/runtime/agent-loader.test.js +0 -277
- package/dist/runtime/agent-loader.test.js.map +0 -1
- package/dist/runtime/client.test.d.ts +0 -2
- package/dist/runtime/client.test.d.ts.map +0 -1
- package/dist/runtime/client.test.js +0 -772
- package/dist/runtime/client.test.js.map +0 -1
- package/dist/runtime/path-config.test.d.ts +0 -2
- package/dist/runtime/path-config.test.d.ts.map +0 -1
- package/dist/runtime/path-config.test.js +0 -112
- package/dist/runtime/path-config.test.js.map +0 -1
|
@@ -1,23 +1,364 @@
|
|
|
1
1
|
name: github-pr-review
|
|
2
|
-
description: Review a GitHub pull request
|
|
2
|
+
description: Review a GitHub pull request, optionally posting a description, DRS comments, a visual HTML explainer, and a stacked fix PR
|
|
3
3
|
inputs:
|
|
4
|
-
owner:
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
owner:
|
|
5
|
+
type: string
|
|
6
|
+
required: true
|
|
7
|
+
description: GitHub repository owner
|
|
8
|
+
repo:
|
|
9
|
+
type: string
|
|
10
|
+
required: true
|
|
11
|
+
description: GitHub repository name
|
|
12
|
+
pr:
|
|
13
|
+
type: number
|
|
14
|
+
required: true
|
|
15
|
+
description: Pull request number
|
|
16
|
+
describe:
|
|
17
|
+
type: boolean
|
|
18
|
+
default: false
|
|
19
|
+
description: Generate and post a PR description
|
|
20
|
+
post:
|
|
21
|
+
type: boolean
|
|
22
|
+
default: false
|
|
23
|
+
description: Post DRS review comments to the PR
|
|
24
|
+
visual:
|
|
25
|
+
type: boolean
|
|
26
|
+
default: false
|
|
27
|
+
description: Generate a visual HTML explainer artifact
|
|
28
|
+
fix:
|
|
29
|
+
type: boolean
|
|
30
|
+
default: false
|
|
31
|
+
description: Attempt to fix qualifying review findings
|
|
32
|
+
fixMode:
|
|
33
|
+
type: enum
|
|
34
|
+
values: [stacked, internal]
|
|
35
|
+
default: stacked
|
|
36
|
+
description: Create stacked fix PR or push verified fixes to the source branch
|
|
37
|
+
fixSeverity:
|
|
38
|
+
type: enum
|
|
39
|
+
values: [critical, high, medium, low]
|
|
40
|
+
default: high
|
|
41
|
+
description: Minimum finding severity to fix
|
|
42
|
+
fixMinIssues:
|
|
43
|
+
type: number
|
|
44
|
+
default: 1
|
|
45
|
+
description: Minimum matching issues required before fixing
|
|
46
|
+
fixBranchPrefix:
|
|
47
|
+
type: string
|
|
48
|
+
default: drs-fix/pr-
|
|
49
|
+
fixCreateChangeRequest:
|
|
50
|
+
type: boolean
|
|
51
|
+
default: false
|
|
52
|
+
fixMaxIterations:
|
|
53
|
+
type: number
|
|
54
|
+
default: 3
|
|
55
|
+
allowStackedSource:
|
|
56
|
+
type: boolean
|
|
57
|
+
default: false
|
|
58
|
+
fixDraft:
|
|
59
|
+
type: boolean
|
|
60
|
+
default: false
|
|
61
|
+
visualOutputPath:
|
|
62
|
+
type: string
|
|
63
|
+
default: .drs/visual-pr-explainer.html
|
|
64
|
+
output: review
|
|
7
65
|
nodes:
|
|
8
66
|
change:
|
|
9
67
|
action: change-source
|
|
10
68
|
with:
|
|
11
69
|
type: github-pr
|
|
12
|
-
owner:
|
|
13
|
-
repo:
|
|
14
|
-
pr:
|
|
70
|
+
owner: '{{inputs.owner}}'
|
|
71
|
+
repo: '{{inputs.repo}}'
|
|
72
|
+
pr: '{{inputs.pr}}'
|
|
15
73
|
output: change
|
|
16
74
|
|
|
75
|
+
describe:
|
|
76
|
+
action: describe
|
|
77
|
+
needs:
|
|
78
|
+
- change
|
|
79
|
+
if: inputs.describe == true
|
|
80
|
+
with:
|
|
81
|
+
source: change
|
|
82
|
+
post: true
|
|
83
|
+
output: description
|
|
84
|
+
|
|
17
85
|
review:
|
|
18
86
|
action: review
|
|
19
87
|
needs:
|
|
20
88
|
- change
|
|
21
89
|
with:
|
|
22
90
|
source: change
|
|
91
|
+
artifact: persistedReviewArtifact
|
|
23
92
|
output: review
|
|
93
|
+
|
|
94
|
+
visual:
|
|
95
|
+
agent: visual/pr-explainer
|
|
96
|
+
needs:
|
|
97
|
+
- change
|
|
98
|
+
- review
|
|
99
|
+
if: inputs.visual == true
|
|
100
|
+
input: |
|
|
101
|
+
Generate a visual PR explainer HTML artifact.
|
|
102
|
+
|
|
103
|
+
Output path: {{inputs.visualOutputPath}}
|
|
104
|
+
Slide mode: false
|
|
105
|
+
|
|
106
|
+
Use the supplied DRS change-source context. If important file diffs are omitted or summarized, use git_diff for those files before explaining them.
|
|
107
|
+
|
|
108
|
+
DRS change-source context:
|
|
109
|
+
{{artifacts.change}}
|
|
110
|
+
|
|
111
|
+
DRS review result:
|
|
112
|
+
{{artifacts.review}}
|
|
113
|
+
writes: '{{inputs.visualOutputPath}}'
|
|
114
|
+
output: visualExplainer
|
|
115
|
+
|
|
116
|
+
post-comments:
|
|
117
|
+
action: post-review-comments
|
|
118
|
+
needs:
|
|
119
|
+
- review
|
|
120
|
+
if: inputs.post == true
|
|
121
|
+
with:
|
|
122
|
+
source: change
|
|
123
|
+
review: review
|
|
124
|
+
output: postedReview
|
|
125
|
+
|
|
126
|
+
stack-guard:
|
|
127
|
+
action: stack-guard
|
|
128
|
+
needs:
|
|
129
|
+
- change
|
|
130
|
+
- review
|
|
131
|
+
if: inputs.fix == true
|
|
132
|
+
with:
|
|
133
|
+
source: change
|
|
134
|
+
allowStackedSource: '{{inputs.allowStackedSource}}'
|
|
135
|
+
output: stackGuard
|
|
136
|
+
|
|
137
|
+
fix-threshold:
|
|
138
|
+
action: review-threshold
|
|
139
|
+
needs:
|
|
140
|
+
- review
|
|
141
|
+
- stack-guard
|
|
142
|
+
if: artifacts.stackGuard.allowed == true
|
|
143
|
+
with:
|
|
144
|
+
review: review
|
|
145
|
+
severity: '{{inputs.fixSeverity}}'
|
|
146
|
+
minIssues: '{{inputs.fixMinIssues}}'
|
|
147
|
+
output: reviewThreshold
|
|
148
|
+
|
|
149
|
+
fix-branch:
|
|
150
|
+
action: git-branch
|
|
151
|
+
needs:
|
|
152
|
+
- fix-threshold
|
|
153
|
+
if: artifacts.reviewThreshold.matched == true
|
|
154
|
+
with:
|
|
155
|
+
name: '{{inputs.fixBranchPrefix}}{{inputs.pr}}'
|
|
156
|
+
force: true
|
|
157
|
+
output: fixBranch
|
|
158
|
+
|
|
159
|
+
fix-issues:
|
|
160
|
+
agent: task/review-issue-fixer
|
|
161
|
+
needs:
|
|
162
|
+
- fix-branch
|
|
163
|
+
- review
|
|
164
|
+
input: |
|
|
165
|
+
Fix actionable issues from this DRS review artifact for GitHub PR #{{inputs.pr}}.
|
|
166
|
+
|
|
167
|
+
Only fix findings at or above severity {{inputs.fixSeverity}} unless a lower-severity issue is directly required by such a fix.
|
|
168
|
+
|
|
169
|
+
Review artifact path: {{artifacts.persistedReviewArtifact.path}}
|
|
170
|
+
|
|
171
|
+
Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
|
|
172
|
+
|
|
173
|
+
Current PR change source files (read these as needed):
|
|
174
|
+
{{artifacts.change.files}}
|
|
175
|
+
|
|
176
|
+
Use the drs_check tool after making changes to run configured validation checks before returning.
|
|
177
|
+
output: fixes
|
|
178
|
+
|
|
179
|
+
fix-change:
|
|
180
|
+
action: change-source
|
|
181
|
+
needs:
|
|
182
|
+
- fix-issues
|
|
183
|
+
if: inputs.fixMode == internal
|
|
184
|
+
with:
|
|
185
|
+
type: local
|
|
186
|
+
staged: false
|
|
187
|
+
output: fixChange
|
|
188
|
+
|
|
189
|
+
stage-fixes:
|
|
190
|
+
action: git-add
|
|
191
|
+
needs:
|
|
192
|
+
- fix-change
|
|
193
|
+
if: inputs.fixMode == internal
|
|
194
|
+
with:
|
|
195
|
+
paths: '.'
|
|
196
|
+
output: stagedFixes
|
|
197
|
+
|
|
198
|
+
verification-change:
|
|
199
|
+
action: change-source
|
|
200
|
+
needs:
|
|
201
|
+
- fix-change
|
|
202
|
+
if: inputs.fixMode == internal
|
|
203
|
+
with:
|
|
204
|
+
type: fix-verification
|
|
205
|
+
source: change
|
|
206
|
+
fixChange: fixChange
|
|
207
|
+
output: verificationChange
|
|
208
|
+
|
|
209
|
+
re-review:
|
|
210
|
+
action: review
|
|
211
|
+
needs:
|
|
212
|
+
- verification-change
|
|
213
|
+
if: inputs.fixMode == internal
|
|
214
|
+
with:
|
|
215
|
+
source: verificationChange
|
|
216
|
+
reviewArtifact: persistedReviewArtifact
|
|
217
|
+
severity: '{{inputs.fixSeverity}}'
|
|
218
|
+
output: reReview
|
|
219
|
+
|
|
220
|
+
verify-fix:
|
|
221
|
+
action: verify-fix
|
|
222
|
+
needs:
|
|
223
|
+
- re-review
|
|
224
|
+
- fix-change
|
|
225
|
+
if: inputs.fixMode == internal
|
|
226
|
+
with:
|
|
227
|
+
artifact: persistedReviewArtifact
|
|
228
|
+
review: reReview
|
|
229
|
+
fixChange: fixChange
|
|
230
|
+
severity: '{{inputs.fixSeverity}}'
|
|
231
|
+
minIssues: '1'
|
|
232
|
+
output: persistedReviewArtifact
|
|
233
|
+
|
|
234
|
+
fix-loop:
|
|
235
|
+
control: loop
|
|
236
|
+
needs:
|
|
237
|
+
- verify-fix
|
|
238
|
+
if: artifacts.verify-fix.shouldContinue == true && inputs.fixMode == internal
|
|
239
|
+
target: fix-issues
|
|
240
|
+
exit: post-fix-status-internal
|
|
241
|
+
maxIterations: '{{inputs.fixMaxIterations}}'
|
|
242
|
+
onMaxIterations: exit
|
|
243
|
+
|
|
244
|
+
post-fix-status-internal:
|
|
245
|
+
action: post-fix-status
|
|
246
|
+
needs:
|
|
247
|
+
- verify-fix
|
|
248
|
+
if: inputs.fixMode == internal
|
|
249
|
+
with:
|
|
250
|
+
platform: github
|
|
251
|
+
owner: '{{inputs.owner}}'
|
|
252
|
+
repo: '{{inputs.repo}}'
|
|
253
|
+
pr: '{{inputs.pr}}'
|
|
254
|
+
source: change
|
|
255
|
+
reviewArtifact: persistedReviewArtifact
|
|
256
|
+
fixReview: reReview
|
|
257
|
+
fixChange: fixChange
|
|
258
|
+
severity: '{{inputs.fixSeverity}}'
|
|
259
|
+
marker: drs-fix-status
|
|
260
|
+
output: fixStatus
|
|
261
|
+
|
|
262
|
+
commit-internal-fix:
|
|
263
|
+
action: git-commit
|
|
264
|
+
needs:
|
|
265
|
+
- post-fix-status-internal
|
|
266
|
+
if: artifacts.verify-fix.fixFiles > 0
|
|
267
|
+
with:
|
|
268
|
+
message: 'fix: address DRS review issues for PR #{{inputs.pr}}'
|
|
269
|
+
paths: '.'
|
|
270
|
+
output: internalFixCommit
|
|
271
|
+
|
|
272
|
+
push-internal-fix:
|
|
273
|
+
action: git-push
|
|
274
|
+
needs:
|
|
275
|
+
- commit-internal-fix
|
|
276
|
+
with:
|
|
277
|
+
branch: HEAD
|
|
278
|
+
remoteBranch: '{{artifacts.change.context.pullRequest.sourceBranch}}'
|
|
279
|
+
setUpstream: false
|
|
280
|
+
output: internalFixPush
|
|
281
|
+
|
|
282
|
+
fix-diff:
|
|
283
|
+
action: has-diff
|
|
284
|
+
needs:
|
|
285
|
+
- fix-issues
|
|
286
|
+
if: inputs.fixMode != internal
|
|
287
|
+
output: fixDiff
|
|
288
|
+
|
|
289
|
+
fix-commit:
|
|
290
|
+
action: git-commit
|
|
291
|
+
needs:
|
|
292
|
+
- fix-diff
|
|
293
|
+
if: artifacts.fixDiff.changed == true && inputs.fixCreateChangeRequest == true && inputs.fixMode != internal
|
|
294
|
+
with:
|
|
295
|
+
message: 'fix: address DRS review issues for PR #{{inputs.pr}}'
|
|
296
|
+
paths: '.'
|
|
297
|
+
output: fixCommit
|
|
298
|
+
|
|
299
|
+
fix-push:
|
|
300
|
+
action: git-push
|
|
301
|
+
needs:
|
|
302
|
+
- fix-commit
|
|
303
|
+
with:
|
|
304
|
+
branch: '{{inputs.fixBranchPrefix}}{{inputs.pr}}'
|
|
305
|
+
output: fixPush
|
|
306
|
+
|
|
307
|
+
create-fix-pr:
|
|
308
|
+
action: create-change-request
|
|
309
|
+
needs:
|
|
310
|
+
- fix-push
|
|
311
|
+
with:
|
|
312
|
+
platform: github
|
|
313
|
+
owner: '{{inputs.owner}}'
|
|
314
|
+
repo: '{{inputs.repo}}'
|
|
315
|
+
sourceBranch: '{{inputs.fixBranchPrefix}}{{inputs.pr}}'
|
|
316
|
+
targetBranch: '{{artifacts.change.context.pullRequest.sourceBranch}}'
|
|
317
|
+
title: 'fix: address DRS review issues for PR #{{inputs.pr}}'
|
|
318
|
+
draft: '{{inputs.fixDraft}}'
|
|
319
|
+
body: |
|
|
320
|
+
Automated DRS fix stacked on PR #{{inputs.pr}} from the main github-pr-review workflow.
|
|
321
|
+
|
|
322
|
+
Threshold: {{inputs.fixSeverity}}, minimum issues: {{inputs.fixMinIssues}}
|
|
323
|
+
Review artifact: {{artifacts.persistedReviewArtifact.path}}
|
|
324
|
+
|
|
325
|
+
<!-- drs-stack-source: github:{{inputs.owner}}/{{inputs.repo}}#{{inputs.pr}} -->
|
|
326
|
+
<!-- drs-stack-kind: fix -->
|
|
327
|
+
output: changeRequest
|
|
328
|
+
|
|
329
|
+
notify-fix-pr:
|
|
330
|
+
action: post-comment
|
|
331
|
+
needs:
|
|
332
|
+
- create-fix-pr
|
|
333
|
+
with:
|
|
334
|
+
platform: github
|
|
335
|
+
owner: '{{inputs.owner}}'
|
|
336
|
+
repo: '{{inputs.repo}}'
|
|
337
|
+
pr: '{{inputs.pr}}'
|
|
338
|
+
marker: drs-stacked-fix-notification
|
|
339
|
+
input: |
|
|
340
|
+
🔧 DRS created a stacked fix PR: {{artifacts.changeRequest.url}}
|
|
341
|
+
|
|
342
|
+
The fix addresses {{inputs.fixSeverity}}-priority review findings from this PR's review run.
|
|
343
|
+
|
|
344
|
+
<!-- drs-stacked-fix-notification -->
|
|
345
|
+
|
|
346
|
+
post-fix-status-stacked:
|
|
347
|
+
action: post-fix-status
|
|
348
|
+
needs:
|
|
349
|
+
- create-fix-pr
|
|
350
|
+
- review
|
|
351
|
+
with:
|
|
352
|
+
platform: github
|
|
353
|
+
owner: '{{inputs.owner}}'
|
|
354
|
+
repo: '{{inputs.repo}}'
|
|
355
|
+
pr: '{{inputs.pr}}'
|
|
356
|
+
source: change
|
|
357
|
+
reviewArtifact: persistedReviewArtifact
|
|
358
|
+
severity: '{{inputs.fixSeverity}}'
|
|
359
|
+
stackedPrUrl: '{{artifacts.changeRequest.url}}'
|
|
360
|
+
marker: drs-fix-status
|
|
361
|
+
output: fixStatus
|
|
362
|
+
|
|
363
|
+
done:
|
|
364
|
+
control: end
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
name: github-pr-show-changes
|
|
2
2
|
description: Show the review context for a GitHub pull request
|
|
3
3
|
inputs:
|
|
4
|
-
owner:
|
|
5
|
-
repo:
|
|
6
|
-
pr:
|
|
7
|
-
file:
|
|
4
|
+
owner: ''
|
|
5
|
+
repo: ''
|
|
6
|
+
pr: ''
|
|
7
|
+
file: ''
|
|
8
8
|
nodes:
|
|
9
9
|
change:
|
|
10
10
|
action: change-source
|
|
11
11
|
with:
|
|
12
12
|
type: github-pr
|
|
13
|
-
owner:
|
|
14
|
-
repo:
|
|
15
|
-
pr:
|
|
13
|
+
owner: '{{inputs.owner}}'
|
|
14
|
+
repo: '{{inputs.repo}}'
|
|
15
|
+
pr: '{{inputs.pr}}'
|
|
16
16
|
output: change
|
|
17
17
|
|
|
18
18
|
context:
|
|
@@ -21,5 +21,5 @@ nodes:
|
|
|
21
21
|
- change
|
|
22
22
|
with:
|
|
23
23
|
source: change
|
|
24
|
-
file:
|
|
24
|
+
file: '{{inputs.file}}'
|
|
25
25
|
output: reviewContext
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
name: github-pr-update-agents-md-stacked
|
|
2
|
+
description: Update agent guidance for a GitHub PR and open a stacked PR when warranted
|
|
3
|
+
inputs:
|
|
4
|
+
owner: ''
|
|
5
|
+
repo: ''
|
|
6
|
+
pr: ''
|
|
7
|
+
paths: 'AGENTS.md,CLAUDE.md,.github/copilot-instructions.md'
|
|
8
|
+
branchPrefix: 'drs-guidance/pr-'
|
|
9
|
+
allowStackedSource: 'false'
|
|
10
|
+
draft: 'false'
|
|
11
|
+
output: changeRequest
|
|
12
|
+
nodes:
|
|
13
|
+
change:
|
|
14
|
+
action: change-source
|
|
15
|
+
with:
|
|
16
|
+
type: github-pr
|
|
17
|
+
owner: '{{inputs.owner}}'
|
|
18
|
+
repo: '{{inputs.repo}}'
|
|
19
|
+
pr: '{{inputs.pr}}'
|
|
20
|
+
output: change
|
|
21
|
+
|
|
22
|
+
guard:
|
|
23
|
+
action: stack-guard
|
|
24
|
+
needs:
|
|
25
|
+
- change
|
|
26
|
+
with:
|
|
27
|
+
source: change
|
|
28
|
+
allowStackedSource: '{{inputs.allowStackedSource}}'
|
|
29
|
+
output: stackGuard
|
|
30
|
+
|
|
31
|
+
branch:
|
|
32
|
+
action: git-branch
|
|
33
|
+
needs:
|
|
34
|
+
- guard
|
|
35
|
+
if: '{{artifacts.stackGuard.allowed}} == true'
|
|
36
|
+
with:
|
|
37
|
+
name: '{{inputs.branchPrefix}}{{inputs.pr}}'
|
|
38
|
+
force: true
|
|
39
|
+
output: branch
|
|
40
|
+
|
|
41
|
+
update-guidance:
|
|
42
|
+
agent: task/agents-md-updater
|
|
43
|
+
needs:
|
|
44
|
+
- change
|
|
45
|
+
- branch
|
|
46
|
+
input: |
|
|
47
|
+
Decide whether this GitHub PR warrants an update to repository coding-agent guidance.
|
|
48
|
+
|
|
49
|
+
Guidance paths to consider: {{inputs.paths}}
|
|
50
|
+
|
|
51
|
+
If no durable guidance update is warranted, leave files unchanged and say so.
|
|
52
|
+
|
|
53
|
+
GitHub PR change source:
|
|
54
|
+
{{artifacts.change}}
|
|
55
|
+
output: guidance
|
|
56
|
+
|
|
57
|
+
diff:
|
|
58
|
+
action: has-diff
|
|
59
|
+
needs:
|
|
60
|
+
- update-guidance
|
|
61
|
+
with:
|
|
62
|
+
paths: '{{inputs.paths}}'
|
|
63
|
+
output: guidanceDiff
|
|
64
|
+
|
|
65
|
+
commit:
|
|
66
|
+
action: git-commit
|
|
67
|
+
needs:
|
|
68
|
+
- diff
|
|
69
|
+
if: '{{artifacts.guidanceDiff.changed}} == true'
|
|
70
|
+
with:
|
|
71
|
+
message: 'docs: update agent guidance for PR #{{inputs.pr}}'
|
|
72
|
+
paths: '{{inputs.paths}}'
|
|
73
|
+
output: commit
|
|
74
|
+
|
|
75
|
+
push:
|
|
76
|
+
action: git-push
|
|
77
|
+
needs:
|
|
78
|
+
- commit
|
|
79
|
+
with:
|
|
80
|
+
branch: '{{inputs.branchPrefix}}{{inputs.pr}}'
|
|
81
|
+
output: push
|
|
82
|
+
|
|
83
|
+
create:
|
|
84
|
+
action: create-change-request
|
|
85
|
+
needs:
|
|
86
|
+
- push
|
|
87
|
+
with:
|
|
88
|
+
platform: github
|
|
89
|
+
owner: '{{inputs.owner}}'
|
|
90
|
+
repo: '{{inputs.repo}}'
|
|
91
|
+
sourceBranch: '{{inputs.branchPrefix}}{{inputs.pr}}'
|
|
92
|
+
targetBranch: '{{artifacts.change.context.pullRequest.sourceBranch}}'
|
|
93
|
+
title: 'docs: update agent guidance for PR #{{inputs.pr}}'
|
|
94
|
+
draft: '{{inputs.draft}}'
|
|
95
|
+
body: |
|
|
96
|
+
Automated DRS guidance update stacked on PR #{{inputs.pr}}.
|
|
97
|
+
|
|
98
|
+
<!-- drs-stack-source: github:{{inputs.owner}}/{{inputs.repo}}#{{inputs.pr}} -->
|
|
99
|
+
<!-- drs-stack-kind: guidance -->
|
|
100
|
+
output: changeRequest
|
|
101
|
+
|
|
102
|
+
done:
|
|
103
|
+
control: end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: github-pr-visual-explain
|
|
2
|
+
description: Generate a visual HTML explainer artifact for a GitHub pull request
|
|
3
|
+
inputs:
|
|
4
|
+
owner: ''
|
|
5
|
+
repo: ''
|
|
6
|
+
pr: ''
|
|
7
|
+
outputPath: '.drs/visual-pr-explainer.html'
|
|
8
|
+
slides: 'false'
|
|
9
|
+
output: visualExplainer
|
|
10
|
+
nodes:
|
|
11
|
+
change:
|
|
12
|
+
action: change-source
|
|
13
|
+
with:
|
|
14
|
+
type: github-pr
|
|
15
|
+
owner: '{{inputs.owner}}'
|
|
16
|
+
repo: '{{inputs.repo}}'
|
|
17
|
+
pr: '{{inputs.pr}}'
|
|
18
|
+
output: change
|
|
19
|
+
|
|
20
|
+
visual:
|
|
21
|
+
agent: visual/pr-explainer
|
|
22
|
+
needs:
|
|
23
|
+
- change
|
|
24
|
+
input: |
|
|
25
|
+
Generate a visual PR explainer HTML artifact.
|
|
26
|
+
|
|
27
|
+
Output path: {{inputs.outputPath}}
|
|
28
|
+
Slide mode: {{inputs.slides}}
|
|
29
|
+
|
|
30
|
+
Use the supplied DRS change-source context. If important file diffs are omitted or summarized, use git_diff for those files before explaining them.
|
|
31
|
+
|
|
32
|
+
DRS change-source context:
|
|
33
|
+
{{artifacts.change}}
|
|
34
|
+
writes: '{{inputs.outputPath}}'
|
|
35
|
+
output: visualExplainer
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
name: gitlab-mr-describe
|
|
2
|
-
description: Generate a GitLab merge request description
|
|
2
|
+
description: Generate a GitLab merge request description, optionally posting it
|
|
3
3
|
inputs:
|
|
4
|
-
project:
|
|
5
|
-
mr:
|
|
4
|
+
project: ''
|
|
5
|
+
mr: ''
|
|
6
|
+
post: 'false'
|
|
7
|
+
output: description
|
|
6
8
|
nodes:
|
|
7
9
|
change:
|
|
8
10
|
action: change-source
|
|
9
11
|
with:
|
|
10
12
|
type: gitlab-mr
|
|
11
|
-
project:
|
|
12
|
-
mr:
|
|
13
|
+
project: '{{inputs.project}}'
|
|
14
|
+
mr: '{{inputs.mr}}'
|
|
13
15
|
output: change
|
|
14
16
|
|
|
15
17
|
describe:
|
|
@@ -18,4 +20,5 @@ nodes:
|
|
|
18
20
|
- change
|
|
19
21
|
with:
|
|
20
22
|
source: change
|
|
23
|
+
post: '{{inputs.post}}'
|
|
21
24
|
output: description
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
name: gitlab-mr-fix-review-issues-stacked
|
|
2
|
+
description: Fix high-severity GitLab MR review issues and open a stacked MR
|
|
3
|
+
inputs:
|
|
4
|
+
project: ''
|
|
5
|
+
mr: ''
|
|
6
|
+
severity: 'high'
|
|
7
|
+
minIssues: '1'
|
|
8
|
+
branchPrefix: 'drs-fix/mr-'
|
|
9
|
+
allowStackedSource: 'false'
|
|
10
|
+
draft: 'false'
|
|
11
|
+
output: changeRequest
|
|
12
|
+
nodes:
|
|
13
|
+
change:
|
|
14
|
+
action: change-source
|
|
15
|
+
with:
|
|
16
|
+
type: gitlab-mr
|
|
17
|
+
project: '{{inputs.project}}'
|
|
18
|
+
mr: '{{inputs.mr}}'
|
|
19
|
+
output: change
|
|
20
|
+
|
|
21
|
+
guard:
|
|
22
|
+
action: stack-guard
|
|
23
|
+
needs:
|
|
24
|
+
- change
|
|
25
|
+
with:
|
|
26
|
+
source: change
|
|
27
|
+
allowStackedSource: '{{inputs.allowStackedSource}}'
|
|
28
|
+
output: stackGuard
|
|
29
|
+
|
|
30
|
+
review:
|
|
31
|
+
action: review
|
|
32
|
+
needs:
|
|
33
|
+
- change
|
|
34
|
+
- guard
|
|
35
|
+
if: '{{artifacts.stackGuard.allowed}} == true'
|
|
36
|
+
with:
|
|
37
|
+
source: change
|
|
38
|
+
artifact: persistedReviewArtifact
|
|
39
|
+
output: review
|
|
40
|
+
|
|
41
|
+
threshold:
|
|
42
|
+
action: review-threshold
|
|
43
|
+
needs:
|
|
44
|
+
- review
|
|
45
|
+
with:
|
|
46
|
+
review: review
|
|
47
|
+
severity: '{{inputs.severity}}'
|
|
48
|
+
minIssues: '{{inputs.minIssues}}'
|
|
49
|
+
output: reviewThreshold
|
|
50
|
+
|
|
51
|
+
branch:
|
|
52
|
+
action: git-branch
|
|
53
|
+
needs:
|
|
54
|
+
- threshold
|
|
55
|
+
if: '{{artifacts.reviewThreshold.matched}} == true'
|
|
56
|
+
with:
|
|
57
|
+
name: '{{inputs.branchPrefix}}{{inputs.mr}}'
|
|
58
|
+
force: true
|
|
59
|
+
output: branch
|
|
60
|
+
|
|
61
|
+
fix-issues:
|
|
62
|
+
agent: task/review-issue-fixer
|
|
63
|
+
needs:
|
|
64
|
+
- branch
|
|
65
|
+
- review
|
|
66
|
+
input: |
|
|
67
|
+
Fix actionable issues from this DRS review artifact for GitLab MR !{{inputs.mr}}.
|
|
68
|
+
|
|
69
|
+
Only fix findings at or above severity {{inputs.severity}} unless a lower-severity issue is directly required by such a fix.
|
|
70
|
+
|
|
71
|
+
Review artifact path: {{artifacts.persistedReviewArtifact.path}}
|
|
72
|
+
|
|
73
|
+
Use the read_artifact tool with this path to get the finding manifest, then pull full details for specific findings by id. Do not assume the review JSON is in this prompt — call the tool.
|
|
74
|
+
|
|
75
|
+
Current MR change source files (read these as needed):
|
|
76
|
+
{{artifacts.change.files}}
|
|
77
|
+
|
|
78
|
+
Use the drs_check tool after making changes to run configured validation checks before returning.
|
|
79
|
+
output: fixes
|
|
80
|
+
|
|
81
|
+
diff:
|
|
82
|
+
action: has-diff
|
|
83
|
+
needs:
|
|
84
|
+
- fix-issues
|
|
85
|
+
output: fixDiff
|
|
86
|
+
|
|
87
|
+
commit:
|
|
88
|
+
action: git-commit
|
|
89
|
+
needs:
|
|
90
|
+
- diff
|
|
91
|
+
if: '{{artifacts.fixDiff.changed}} == true'
|
|
92
|
+
with:
|
|
93
|
+
message: 'fix: address DRS review issues for MR !{{inputs.mr}}'
|
|
94
|
+
paths: '.'
|
|
95
|
+
output: commit
|
|
96
|
+
|
|
97
|
+
push:
|
|
98
|
+
action: git-push
|
|
99
|
+
needs:
|
|
100
|
+
- commit
|
|
101
|
+
with:
|
|
102
|
+
branch: '{{inputs.branchPrefix}}{{inputs.mr}}'
|
|
103
|
+
output: push
|
|
104
|
+
|
|
105
|
+
create:
|
|
106
|
+
action: create-change-request
|
|
107
|
+
needs:
|
|
108
|
+
- push
|
|
109
|
+
with:
|
|
110
|
+
platform: gitlab
|
|
111
|
+
project: '{{inputs.project}}'
|
|
112
|
+
sourceBranch: '{{inputs.branchPrefix}}{{inputs.mr}}'
|
|
113
|
+
targetBranch: '{{artifacts.change.context.pullRequest.sourceBranch}}'
|
|
114
|
+
title: 'fix: address DRS review issues for MR !{{inputs.mr}}'
|
|
115
|
+
draft: '{{inputs.draft}}'
|
|
116
|
+
body: |
|
|
117
|
+
Automated DRS fix stacked on MR !{{inputs.mr}}.
|
|
118
|
+
|
|
119
|
+
Threshold: {{inputs.severity}}, minimum issues: {{inputs.minIssues}}
|
|
120
|
+
|
|
121
|
+
Review artifact: {{artifacts.persistedReviewArtifact.path}}
|
|
122
|
+
|
|
123
|
+
<!-- drs-stack-source: gitlab:{{inputs.project}}!{{inputs.mr}} -->
|
|
124
|
+
<!-- drs-stack-kind: fix -->
|
|
125
|
+
output: changeRequest
|
|
126
|
+
|
|
127
|
+
post-fix-status:
|
|
128
|
+
action: post-fix-status
|
|
129
|
+
needs:
|
|
130
|
+
- create
|
|
131
|
+
- review
|
|
132
|
+
with:
|
|
133
|
+
platform: gitlab
|
|
134
|
+
project: '{{inputs.project}}'
|
|
135
|
+
mr: '{{inputs.mr}}'
|
|
136
|
+
source: change
|
|
137
|
+
reviewArtifact: persistedReviewArtifact
|
|
138
|
+
severity: '{{inputs.severity}}'
|
|
139
|
+
stackedPrUrl: '{{artifacts.changeRequest.url}}'
|
|
140
|
+
marker: drs-fix-status
|
|
141
|
+
output: fixStatus
|
|
142
|
+
|
|
143
|
+
done:
|
|
144
|
+
control: end
|