-
Notifications
You must be signed in to change notification settings - Fork 54.3k
feat(core): Add workflow history update endpoint (no-changelog) #25043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 11 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/cli/src/workflows/workflow-history/workflow-history.service.ts">
<violation number="1" location="packages/cli/src/workflows/workflow-history/workflow-history.service.ts:145">
P2: updateVersionForUser authorizes using only `workflow:read` via getVersion, so users with read access can update workflow history metadata. Consider requiring `workflow:update` (or a write-capable check) before calling updateVersion.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| updateData: UpdateWorkflowHistoryVersionDto, | ||
| ) { | ||
| // Check rights and ensure version exists | ||
| await this.getVersion(user, workflowId, versionId, { includePublishHistory: false }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: updateVersionForUser authorizes using only workflow:read via getVersion, so users with read access can update workflow history metadata. Consider requiring workflow:update (or a write-capable check) before calling updateVersion.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/cli/src/workflows/workflow-history/workflow-history.service.ts, line 145:
<comment>updateVersionForUser authorizes using only `workflow:read` via getVersion, so users with read access can update workflow history metadata. Consider requiring `workflow:update` (or a write-capable check) before calling updateVersion.</comment>
<file context>
@@ -134,8 +135,24 @@ export class WorkflowHistoryService {
+ updateData: UpdateWorkflowHistoryVersionDto,
+ ) {
+ // Check rights and ensure version exists
+ await this.getVersion(user, workflowId, versionId, { includePublishHistory: false });
+
+ await this.updateVersion(workflowId, versionId, updateData);
</file context>
Bundle ReportBundle size has no change ✅ |
Summary
Related Linear tickets, Github issues, and Community forum posts
Closes ADO-4730
Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)