-
Notifications
You must be signed in to change notification settings - Fork 6
fix(review): add policy-file fallback so comment-only policy reaches cascade-tools #1483
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
Changes from all commits
ac765bf
4b55ff4
30b379a
b479e4a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,12 @@ export interface TrelloConfig { | |
| export interface JiraConfig { | ||
| projectKey: string; | ||
| baseUrl: string; | ||
| /** | ||
| * Optional JIRA authentication mode (non-secret config, mirrors `baseUrl`). | ||
| * `'basic'` = classic site-token mode; `'scoped'` = scoped gateway-token | ||
| * mode. Absent ⇒ treated as `'basic'`. Later stories consume this field. | ||
| */ | ||
| authType?: 'basic' | 'scoped'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed — threaded
Added two mapper-level regression tests in Also reworded the |
||
| statuses: Record<string, string>; | ||
| issueTypes?: Record<string, string>; | ||
| customFields?: { cost?: string }; | ||
|
|
||
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.
Optional hardening: the file is written only for
comment-onlyand never removed. Safe under one-job-per-ephemeral-container, but if/tmpis ever reused across runs (non-container execution or a future change), anallrun would read a stalecomment-onlyfile and incorrectly downgrade the review. Writing the resolved policy unconditionally (bothallandcomment-only) makes the file self-correcting and removes the reliance on container ephemerality — the CLI's env>file>default precedence still holds.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.
Done — the policy file is now written unconditionally with the run's resolved policy (both
allandcomment-only) instead of only forcomment-only.It's self-correcting: an
allrun overwrites any stalecomment-onlyfile rather than inheriting it, removing the reliance on/tmpnever being reused. The CLI's env > file > default precedence inresolveEventPolicyFromEnv()is unchanged.Added tests in
secretOrchestrator.test.tsasserting the write for the default (all),comment-only, and non-review-agent-on-a-comment-only-project (self-correcting) cases — mocking onlywriteFileSyncso no real/tmpI/O happens during the run.