Skip to content

Commit e127bca

Browse files
committed
Update session title and bugbot marker prefix to 'copilot': Refactor OpenCode session creation and update documentation references to reflect the new naming convention for improved clarity and consistency.
1 parent 3d96171 commit e127bca

10 files changed

Lines changed: 37 additions & 37 deletions

File tree

build/cli/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49152,7 +49152,7 @@ async function opencodeMessageWithAgentRaw(baseUrl, options) {
4915249152
(0, logger_1.logDebugInfo)(`OpenCode message body: agent=${options.agent}, model=${options.providerID}/${options.modelID}, parts[0].text length=${options.promptText.length}`);
4915349153
const base = ensureNoTrailingSlash(baseUrl);
4915449154
const signal = createTimeoutSignal(constants_1.OPENCODE_REQUEST_TIMEOUT_MS);
49155-
const sessionBody = { title: 'gbf' };
49155+
const sessionBody = { title: 'copilot' };
4915649156
(0, logger_1.logDebugInfo)(`OpenCode session create body: ${JSON.stringify(sessionBody)}`);
4915749157
const createRes = await fetch(`${base}/session`, {
4915849158
method: 'POST',
@@ -57683,8 +57683,8 @@ exports.ACTIONS = {
5768357683
DETECT_POTENTIAL_PROBLEMS: 'detect_potential_problems_action',
5768457684
RECOMMEND_STEPS: 'recommend_steps_action',
5768557685
};
57686-
/** Hidden HTML comment prefix for bugbot findings (issue/PR comments). Format: <!-- gbf-bugbot finding_id:"id" resolved:true|false --> */
57687-
exports.BUGBOT_MARKER_PREFIX = 'gbf-bugbot';
57686+
/** Hidden HTML comment prefix for bugbot findings (issue/PR comments). Format: <!-- copilot-bugbot finding_id:"id" resolved:true|false --> */
57687+
exports.BUGBOT_MARKER_PREFIX = 'copilot-bugbot';
5768857688
/** Max number of individual bugbot comments to create per issue/PR. Excess findings get one summary comment suggesting to review locally. */
5768957689
exports.BUGBOT_MAX_COMMENTS = 20;
5769057690
/** Minimum severity to publish (findings below this are dropped). Order: high > medium > low > info. */

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ export declare const ACTIONS: {
202202
readonly DETECT_POTENTIAL_PROBLEMS: "detect_potential_problems_action";
203203
readonly RECOMMEND_STEPS: "recommend_steps_action";
204204
};
205-
/** Hidden HTML comment prefix for bugbot findings (issue/PR comments). Format: <!-- gbf-bugbot finding_id:"id" resolved:true|false --> */
206-
export declare const BUGBOT_MARKER_PREFIX = "gbf-bugbot";
205+
/** Hidden HTML comment prefix for bugbot findings (issue/PR comments). Format: <!-- copilot-bugbot finding_id:"id" resolved:true|false --> */
206+
export declare const BUGBOT_MARKER_PREFIX = "copilot-bugbot";
207207
/** Max number of individual bugbot comments to create per issue/PR. Excess findings get one summary comment suggesting to review locally. */
208208
export declare const BUGBOT_MAX_COMMENTS = 20;
209209
/** Minimum severity to publish (findings below this are dropped). Order: high > medium > low > info. */

build/github_action/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44231,7 +44231,7 @@ async function opencodeMessageWithAgentRaw(baseUrl, options) {
4423144231
(0, logger_1.logDebugInfo)(`OpenCode message body: agent=${options.agent}, model=${options.providerID}/${options.modelID}, parts[0].text length=${options.promptText.length}`);
4423244232
const base = ensureNoTrailingSlash(baseUrl);
4423344233
const signal = createTimeoutSignal(constants_1.OPENCODE_REQUEST_TIMEOUT_MS);
44234-
const sessionBody = { title: 'gbf' };
44234+
const sessionBody = { title: 'copilot' };
4423544235
(0, logger_1.logDebugInfo)(`OpenCode session create body: ${JSON.stringify(sessionBody)}`);
4423644236
const createRes = await fetch(`${base}/session`, {
4423744237
method: 'POST',
@@ -52981,8 +52981,8 @@ exports.ACTIONS = {
5298152981
DETECT_POTENTIAL_PROBLEMS: 'detect_potential_problems_action',
5298252982
RECOMMEND_STEPS: 'recommend_steps_action',
5298352983
};
52984-
/** Hidden HTML comment prefix for bugbot findings (issue/PR comments). Format: <!-- gbf-bugbot finding_id:"id" resolved:true|false --> */
52985-
exports.BUGBOT_MARKER_PREFIX = 'gbf-bugbot';
52984+
/** Hidden HTML comment prefix for bugbot findings (issue/PR comments). Format: <!-- copilot-bugbot finding_id:"id" resolved:true|false --> */
52985+
exports.BUGBOT_MARKER_PREFIX = 'copilot-bugbot';
5298652986
/** Max number of individual bugbot comments to create per issue/PR. Excess findings get one summary comment suggesting to review locally. */
5298752987
exports.BUGBOT_MAX_COMMENTS = 20;
5298852988
/** Minimum severity to publish (findings below this are dropped). Order: high > medium > low > info. */

build/github_action/src/data/repository/branch_repository.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export declare class BranchRepository {
3333
totalCommits: number;
3434
files: {
3535
filename: string;
36-
status: "modified" | "added" | "removed" | "renamed" | "copied" | "changed" | "unchanged";
36+
status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
3737
additions: number;
3838
deletions: number;
3939
changes: number;

build/github_action/src/utils/constants.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ export declare const ACTIONS: {
202202
readonly DETECT_POTENTIAL_PROBLEMS: "detect_potential_problems_action";
203203
readonly RECOMMEND_STEPS: "recommend_steps_action";
204204
};
205-
/** Hidden HTML comment prefix for bugbot findings (issue/PR comments). Format: <!-- gbf-bugbot finding_id:"id" resolved:true|false --> */
206-
export declare const BUGBOT_MARKER_PREFIX = "gbf-bugbot";
205+
/** Hidden HTML comment prefix for bugbot findings (issue/PR comments). Format: <!-- copilot-bugbot finding_id:"id" resolved:true|false --> */
206+
export declare const BUGBOT_MARKER_PREFIX = "copilot-bugbot";
207207
/** Max number of individual bugbot comments to create per issue/PR. Excess findings get one summary comment suggesting to review locally. */
208208
export declare const BUGBOT_MAX_COMMENTS = 20;
209209
/** Minimum severity to publish (findings below this are dropped). Order: high > medium > low > info. */

docs/how-to-use.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ Follow these steps to set up Copilot in your repository:
5757
</Step>
5858

5959
<Step title="Install Copilot">
60-
Add the GitHub Action to your repository by creating three workflow files (you can choose any names; common choices are `gbf_commit.yml`, `gbf_issue.yml`, `gbf_pr.yml` or names like "Copilot - Commit", etc.):
61-
1. **Push (commit)** — runs on `push` to any branch: notifies issues of new commits, updates size and progress labels. Create e.g. `.github/workflows/gbf_commit.yml`.
62-
2. **Issues** — runs on `issues` (opened, edited, labeled, unlabeled): creates branches, links to projects, assignees. Create e.g. `.github/workflows/gbf_issue.yml`.
63-
3. **Pull requests** — runs on `pull_request`: links PR to issue, project, reviewers. Create e.g. `.github/workflows/gbf_pr.yml`.
60+
Add the GitHub Action to your repository by creating three workflow files (you can choose any names; common choices are `copilot_commit.yml`, `copilot_issue.yml`, `copilot_pull_request.yml` or names like "Copilot - Commit", etc.):
61+
1. **Push (commit)** — runs on `push` to any branch: notifies issues of new commits, updates size and progress labels. Create e.g. `.github/workflows/copilot_commit.yml`.
62+
2. **Issues** — runs on `issues` (opened, edited, labeled, unlabeled): creates branches, links to projects, assignees. Create e.g. `.github/workflows/copilot_issue.yml`.
63+
3. **Pull requests** — runs on `pull_request`: links PR to issue, project, reviewers. Create e.g. `.github/workflows/copilot_pull_request.yml`.
6464
See the [README](https://github.com/vypdev/copilot#quick-start) for full YAML examples. These workflows will then automatically manage branches, project boards, and the relationship between issues and code.
6565
</Step>
6666
</Steps>

docs/pull-requests/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ When your workflow runs on `pull_request` events (e.g. opened, edited, labeled,
99

1010
## Enable the action for pull requests
1111

12-
Create a workflow file (e.g. `.github/workflows/gbf_pull_request.yml`) that runs on `pull_request`:
12+
Create a workflow file (e.g. `.github/workflows/copilot_pull_request.yml`) that runs on `pull_request`:
1313

1414
```yaml
1515
name: Copilot - Pull Request

src/data/repository/ai_repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ async function opencodeMessageWithAgentRaw(
338338
);
339339
const base = ensureNoTrailingSlash(baseUrl);
340340
const signal = createTimeoutSignal(OPENCODE_REQUEST_TIMEOUT_MS);
341-
const sessionBody = { title: 'gbf' };
341+
const sessionBody = { title: 'copilot' };
342342
logDebugInfo(`OpenCode session create body: ${JSON.stringify(sessionBody)}`);
343343
const createRes = await fetch(`${base}/session`, {
344344
method: 'POST',

src/usecase/steps/commit/__tests__/detect_potential_problems_use_case.test.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ describe('DetectPotentialProblemsUseCase', () => {
207207
expect(mockAddComment).toHaveBeenCalledTimes(1);
208208
expect(mockAddComment).toHaveBeenCalledWith('owner', 'repo', 42, expect.any(String), 'token');
209209
expect(mockAddComment.mock.calls[0][3]).toContain('Possible null dereference');
210-
expect(mockAddComment.mock.calls[0][3]).toContain('gbf-bugbot');
210+
expect(mockAddComment.mock.calls[0][3]).toContain('copilot-bugbot');
211211
expect(mockAddComment.mock.calls[0][3]).toContain('finding_id:"src/foo.ts:10:possible-null"');
212212
expect(mockUpdateComment).not.toHaveBeenCalled();
213213
});
@@ -254,7 +254,7 @@ describe('DetectPotentialProblemsUseCase', () => {
254254
mockListIssueComments.mockResolvedValue([
255255
{
256256
id: 999,
257-
body: `## Existing problem\n\nDetails.\n\n<!-- gbf-bugbot finding_id:"existing-finding-id" resolved:false -->`,
257+
body: `## Existing problem\n\nDetails.\n\n<!-- copilot-bugbot finding_id:"existing-finding-id" resolved:false -->`,
258258
user: { login: 'bot' },
259259
},
260260
]);
@@ -270,7 +270,7 @@ describe('DetectPotentialProblemsUseCase', () => {
270270
mockListIssueComments.mockResolvedValue([
271271
{
272272
id: 888,
273-
body: `## Old bug\n\nDescription.\n\n<!-- gbf-bugbot finding_id:"old-bug-id" resolved:false -->`,
273+
body: `## Old bug\n\nDescription.\n\n<!-- copilot-bugbot finding_id:"old-bug-id" resolved:false -->`,
274274
user: { login: 'bot' },
275275
},
276276
]);
@@ -303,7 +303,7 @@ describe('DetectPotentialProblemsUseCase', () => {
303303
mockListPullRequestReviewComments.mockResolvedValue([
304304
{
305305
id: 777,
306-
body: `## PR finding\n\n<!-- gbf-bugbot finding_id:"pr-finding" resolved:false -->`,
306+
body: `## PR finding\n\n<!-- copilot-bugbot finding_id:"pr-finding" resolved:false -->`,
307307
path: 'src/a.ts',
308308
line: 1,
309309
node_id: 'PRRC_node_777',
@@ -336,7 +336,7 @@ describe('DetectPotentialProblemsUseCase', () => {
336336
mockListIssueComments.mockResolvedValue([
337337
{
338338
id: 666,
339-
body: `## Unfixed\n\n<!-- gbf-bugbot finding_id:"unfixed-id" resolved:false -->`,
339+
body: `## Unfixed\n\n<!-- copilot-bugbot finding_id:"unfixed-id" resolved:false -->`,
340340
user: {},
341341
},
342342
]);
@@ -370,7 +370,7 @@ describe('DetectPotentialProblemsUseCase', () => {
370370
resolved_finding_ids: ['old-1'],
371371
});
372372
mockListIssueComments.mockResolvedValue([
373-
{ id: 1, body: '<!-- gbf-bugbot finding_id:"old-1" resolved:false -->', user: {} },
373+
{ id: 1, body: '<!-- copilot-bugbot finding_id:"old-1" resolved:false -->', user: {} },
374374
]);
375375

376376
const results = await useCase.invoke(baseParam());
@@ -420,7 +420,7 @@ describe('DetectPotentialProblemsUseCase', () => {
420420
mockListPullRequestReviewComments.mockResolvedValue([
421421
{
422422
id: 555,
423-
body: `## Same\n\n<!-- gbf-bugbot finding_id:"same-pr-finding" resolved:false -->`,
423+
body: `## Same\n\n<!-- copilot-bugbot finding_id:"same-pr-finding" resolved:false -->`,
424424
path: 'x.ts',
425425
line: 1,
426426
},
@@ -458,7 +458,7 @@ describe('DetectPotentialProblemsUseCase', () => {
458458
mockListIssueComments.mockResolvedValue([
459459
{
460460
id: 111,
461-
body: `## Extracted Title Here\n\nSome body.\n\n<!-- gbf-bugbot finding_id:"ex-id" resolved:false -->`,
461+
body: `## Extracted Title Here\n\nSome body.\n\n<!-- copilot-bugbot finding_id:"ex-id" resolved:false -->`,
462462
user: {},
463463
},
464464
]);
@@ -486,7 +486,7 @@ describe('DetectPotentialProblemsUseCase', () => {
486486
mockListIssueComments.mockResolvedValue([
487487
{
488488
id: 222,
489-
body: `## Already resolved\n\n<!-- gbf-bugbot finding_id:"done-id" resolved:true -->`,
489+
body: `## Already resolved\n\n<!-- copilot-bugbot finding_id:"done-id" resolved:true -->`,
490490
user: {},
491491
},
492492
]);
@@ -505,7 +505,7 @@ describe('DetectPotentialProblemsUseCase', () => {
505505
mockListIssueComments.mockResolvedValue([
506506
{
507507
id: 333,
508-
body: `## Whitespace variant\n\n<!-- gbf-bugbot finding_id: "spacey-id" resolved:false -->`,
508+
body: `## Whitespace variant\n\n<!-- copilot-bugbot finding_id: "spacey-id" resolved:false -->`,
509509
user: { login: 'bot' },
510510
},
511511
]);
@@ -528,7 +528,7 @@ describe('DetectPotentialProblemsUseCase', () => {
528528
const updatedBody = mockUpdateComment.mock.calls[0][4];
529529
expect(updatedBody).toContain('resolved:true');
530530
expect(updatedBody).toContain('**Resolved** (OpenCode confirmed fixed in latest analysis)');
531-
expect(updatedBody).toContain('gbf-bugbot');
531+
expect(updatedBody).toContain('copilot-bugbot');
532532
});
533533

534534
it('replaces marker in PR review comment when marker has extra whitespace', async () => {
@@ -538,15 +538,15 @@ describe('DetectPotentialProblemsUseCase', () => {
538538
.mockResolvedValueOnce([
539539
{
540540
id: 444,
541-
body: `## PR spacey\n\n<!-- gbf-bugbot finding_id: "pr-spacey-id" resolved:false -->`,
541+
body: `## PR spacey\n\n<!-- copilot-bugbot finding_id: "pr-spacey-id" resolved:false -->`,
542542
path: 'src/b.ts',
543543
line: 1,
544544
},
545545
])
546546
.mockResolvedValueOnce([
547547
{
548548
id: 444,
549-
body: `## PR spacey\n\n<!-- gbf-bugbot finding_id: "pr-spacey-id" resolved:false -->`,
549+
body: `## PR spacey\n\n<!-- copilot-bugbot finding_id: "pr-spacey-id" resolved:false -->`,
550550
path: 'src/b.ts',
551551
line: 1,
552552
},
@@ -568,7 +568,7 @@ describe('DetectPotentialProblemsUseCase', () => {
568568
mockListIssueComments.mockResolvedValue([
569569
{
570570
id: 555,
571-
body: `## Regex id\n\n<!-- gbf-bugbot finding_id:"${findingId}" resolved:false -->`,
571+
body: `## Regex id\n\n<!-- copilot-bugbot finding_id:"${findingId}" resolved:false -->`,
572572
user: {},
573573
},
574574
]);
@@ -601,8 +601,8 @@ describe('DetectPotentialProblemsUseCase', () => {
601601

602602
expect(mockAddComment).toHaveBeenCalledTimes(1);
603603
const body = mockAddComment.mock.calls[0][3];
604-
expect(body).toContain('gbf-bugbot');
605-
const markerMatch = body.match(/<!--\s*gbf-bugbot\s+finding_id:\s*"([^"]+)"\s+resolved:/);
604+
expect(body).toContain('copilot-bugbot');
605+
const markerMatch = body.match(/<!--\s*copilot-bugbot\s+finding_id:\s*"([^"]+)"\s+resolved:/);
606606
expect(markerMatch).toBeTruthy();
607607
const storedId = markerMatch![1];
608608
expect(storedId).not.toContain('-->');
@@ -611,7 +611,7 @@ describe('DetectPotentialProblemsUseCase', () => {
611611
expect(storedId).not.toContain('>');
612612
expect(storedId).not.toContain('\n');
613613
expect(storedId).toBe('file.ts:1:badidwithnewlinehere');
614-
expect(body).toMatch(/<!--\s*gbf-bugbot\s+finding_id:\s*"file\.ts:1:badidwithnewlinehere"\s+resolved:false\s*-->/);
614+
expect(body).toMatch(/<!--\s*copilot-bugbot\s+finding_id:\s*"file\.ts:1:badidwithnewlinehere"\s+resolved:false\s*-->/);
615615
});
616616
});
617617

@@ -701,7 +701,7 @@ describe('DetectPotentialProblemsUseCase', () => {
701701
);
702702
expect(overflowComment).toBeDefined();
703703
expect(overflowComment).toContain('more finding(s)');
704-
const findingComments = bodies.filter((b) => b.includes('gbf-bugbot') && b.includes('finding_id'));
704+
const findingComments = bodies.filter((b) => b.includes('copilot-bugbot') && b.includes('finding_id'));
705705
expect(findingComments.length).toBe(20);
706706
});
707707

src/utils/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ export const ACTIONS = {
400400
RECOMMEND_STEPS: 'recommend_steps_action',
401401
} as const;
402402

403-
/** Hidden HTML comment prefix for bugbot findings (issue/PR comments). Format: <!-- gbf-bugbot finding_id:"id" resolved:true|false --> */
404-
export const BUGBOT_MARKER_PREFIX = 'gbf-bugbot';
403+
/** Hidden HTML comment prefix for bugbot findings (issue/PR comments). Format: <!-- copilot-bugbot finding_id:"id" resolved:true|false --> */
404+
export const BUGBOT_MARKER_PREFIX = 'copilot-bugbot';
405405

406406
/** Max number of individual bugbot comments to create per issue/PR. Excess findings get one summary comment suggesting to review locally. */
407407
export const BUGBOT_MAX_COMMENTS = 20;

0 commit comments

Comments
 (0)