Skip to content

Commit b58aee7

Browse files
authored
Merge release/2.0.3 into master. Forced merge with PAT token.
Merge release/2.0.3 into master
2 parents 459cbd6 + 418429b commit b58aee7

File tree

88 files changed

+2524
-415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2524
-415
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Full documentation: **[docs.page/vypdev/copilot](https://docs.page/vypdev/copilo
2323
| [OpenCode (AI)](https://docs.page/vypdev/copilot/opencode-integration) | Progress, Bugbot, think, AI PR description |
2424
| [Testing OpenCode locally](https://docs.page/vypdev/copilot/testing-opencode-plan-locally) | Run check-progress, detect-potential-problems, recommend-steps via CLI |
2525
| [Single actions](https://docs.page/vypdev/copilot/single-actions) | On-demand: check progress, think, create release/tag, deployed |
26+
| [Deploy label and merge flow](docs/single-actions/deploy-label-and-merge.mdx) | Deploy/deployed labels, post-deploy merges, waiting for checks per PR |
2627
| [Issues](https://docs.page/vypdev/copilot/issues) | Issue configuration and types (feature, bugfix, hotfix, release, docs, chore) |
2728
| [Pull requests](https://docs.page/vypdev/copilot/pull-requests) | PR configuration and AI description |
2829
| [Troubleshooting](https://docs.page/vypdev/copilot/troubleshooting) | Common issues and solutions |

build/cli/index.js

Lines changed: 338 additions & 88 deletions
Large diffs are not rendered by default.

build/cli/src/data/repository/issue_repository.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ export declare class IssueRepository {
3737
isIssue: (owner: string, repository: string, issueNumber: number, token: string) => Promise<boolean>;
3838
isPullRequest: (owner: string, repository: string, issueNumber: number, token: string) => Promise<boolean>;
3939
getHeadBranch: (owner: string, repository: string, issueNumber: number, token: string) => Promise<string | undefined>;
40-
addComment: (owner: string, repository: string, issueNumber: number, comment: string, token: string) => Promise<void>;
41-
updateComment: (owner: string, repository: string, issueNumber: number, commentId: number, comment: string, token: string) => Promise<void>;
40+
addComment: (owner: string, repository: string, issueNumber: number, comment: string, token: string, options?: {
41+
commitSha?: string;
42+
}) => Promise<void>;
43+
updateComment: (owner: string, repository: string, issueNumber: number, commentId: number, comment: string, token: string, options?: {
44+
commitSha?: string;
45+
}) => Promise<void>;
4246
/**
4347
* Lists all comments on an issue (for bugbot: find existing findings by marker).
4448
* Uses pagination to fetch every comment (default API returns only 30 per page).

build/cli/src/data/repository/merge_repository.d.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import { Result } from '../model/result';
22
/**
3-
* Repository for merging branches (via PR or direct merge).
4-
* Isolated to allow unit tests with mocked Octokit.
3+
* Repository for merging branches: creates a PR, waits for that PR's check runs (or status checks),
4+
* then merges the PR; on failure, falls back to a direct Git merge.
5+
*
6+
* Check runs are filtered by PR (pull_requests) so we only wait for the current PR's checks,
7+
* not those of another PR sharing the same head (e.g. release→main vs release→develop).
8+
* If the PR has no check runs after a short wait, we proceed to merge (branch may have no required checks).
9+
*
10+
* @see docs/single-actions/deploy-label-and-merge.mdx for the deploy flow and check-wait behaviour.
511
*/
612
export declare class MergeRepository {
713
mergeBranch: (owner: string, repository: string, head: string, base: string, timeout: number, token: string) => Promise<Result[]>;

build/cli/src/usecase/actions/deployed_action_use_case.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import { Execution } from "../../data/model/execution";
22
import { Result } from "../../data/model/result";
33
import { ParamUseCase } from "../base/param_usecase";
4+
/**
5+
* Single action run after a successful deployment (triggered with the "deployed" action and an issue number).
6+
*
7+
* Requires the issue to have the "deploy" label and not already have the "deployed" label. Then:
8+
* 1. Replaces the "deploy" label with "deployed".
9+
* 2. If a release or hotfix branch is configured: merges it into default and develop (each via PR, waiting for that PR's checks).
10+
* 3. Closes the issue only when all merges succeed.
11+
*
12+
* @see docs/single-actions/deploy-label-and-merge.mdx for the full flow and how merge/check waiting works.
13+
*/
414
export declare class DeployedActionUseCase implements ParamUseCase<Execution, Result[]> {
515
taskId: string;
616
private issueRepository;

build/cli/src/usecase/steps/commit/bugbot/publish_findings_use_case.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export interface PublishFindingsParam {
1212
execution: Execution;
1313
context: BugbotContext;
1414
findings: BugbotFinding[];
15+
/** Commit SHA for bugbot watermark (commit link). When set, comment uses "for commit ..." watermark. */
16+
commitSha?: string;
1517
/** When findings were limited by max comments, add one summary comment with this overflow info. */
1618
overflowCount?: number;
1719
overflowTitles?: string[];
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Watermark appended to comments (issues and PRs) to attribute Copilot.
3+
* Bugbot comments include commit link and note about auto-update on new commits.
4+
*/
5+
export declare const COPILOT_MARKETPLACE_URL = "https://github.com/marketplace/actions/copilot-github-with-super-powers";
6+
export interface BugbotWatermarkOptions {
7+
commitSha: string;
8+
owner: string;
9+
repo: string;
10+
}
11+
export declare function getCommentWatermark(options?: BugbotWatermarkOptions): string;

build/cli/src/utils/logger.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ export interface LogEntry {
44
timestamp: number;
55
metadata?: Record<string, unknown>;
66
}
7+
export declare function getAccumulatedLogEntries(): LogEntry[];
8+
export declare function getAccumulatedLogsAsText(): string;
9+
export declare function clearAccumulatedLogs(): void;
710
export declare function setGlobalLoggerDebug(debug: boolean, isRemote?: boolean): void;
811
export declare function setStructuredLogging(enabled: boolean): void;
9-
export declare function logInfo(message: string, previousWasSingleLine?: boolean, metadata?: Record<string, unknown>): void;
12+
export declare function logInfo(message: string, previousWasSingleLine?: boolean, metadata?: Record<string, unknown>, skipAccumulation?: boolean): void;
1013
export declare function logWarn(message: string, metadata?: Record<string, unknown>): void;
1114
export declare function logWarning(message: string): void;
1215
export declare function logError(message: unknown, metadata?: Record<string, unknown>): void;

0 commit comments

Comments
 (0)