Skip to content

Commit 1c5df1d

Browse files
Copilotpelikhan
andauthored
feat: rename update-pr merge option and scope permissions
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/fad66084-394b-4a19-b77a-f699f706efe7 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent 36818c6 commit 1c5df1d

17 files changed

+97
-77
lines changed

.github/workflows/changeset.lock.yml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/smoke-claude.lock.yml

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

actions/setup/js/safe_output_type_validator.test.cjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ const SAMPLE_VALIDATION_CONFIG = {
4848
},
4949
update_pull_request: {
5050
defaultMax: 1,
51-
customValidation: "requiresOneOf:title,body,merge_base",
51+
customValidation: "requiresOneOf:title,body,update_branch",
5252
fields: {
5353
title: { type: "string", sanitize: true, maxLength: 256 },
5454
body: { type: "string", sanitize: true, maxLength: 65000 },
55-
merge_base: { type: "boolean" },
55+
update_branch: { type: "boolean" },
5656
pull_request_number: { issueOrPRNumber: true },
5757
},
5858
},
@@ -410,19 +410,19 @@ describe("safe_output_type_validator", () => {
410410
expect(result.error).toContain("pull_number");
411411
});
412412

413-
it("should fail for update_pull_request when merge_base is false and no title/body is provided", async () => {
413+
it("should fail for update_pull_request when update_branch is false and no title/body is provided", async () => {
414414
const { validateItem } = await import("./safe_output_type_validator.cjs");
415415

416-
const result = validateItem({ type: "update_pull_request", merge_base: false }, "update_pull_request", 1);
416+
const result = validateItem({ type: "update_pull_request", update_branch: false }, "update_pull_request", 1);
417417

418418
expect(result.isValid).toBe(false);
419419
expect(result.error).toContain("requires at least one of");
420420
});
421421

422-
it("should pass for update_pull_request when merge_base is true", async () => {
422+
it("should pass for update_pull_request when update_branch is true", async () => {
423423
const { validateItem } = await import("./safe_output_type_validator.cjs");
424424

425-
const result = validateItem({ type: "update_pull_request", merge_base: true }, "update_pull_request", 1);
425+
const result = validateItem({ type: "update_pull_request", update_branch: true }, "update_pull_request", 1);
426426

427427
expect(result.isValid).toBe(true);
428428
});

actions/setup/js/safe_outputs_tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@
783783
"enum": ["replace", "append", "prepend"],
784784
"description": "How to update the PR body: 'replace' (default - completely overwrite), 'append' (add to end with separator), or 'prepend' (add to start with separator). Title is always replaced."
785785
},
786-
"merge_base": {
786+
"update_branch": {
787787
"type": "boolean",
788788
"description": "When true, update the pull request branch with the latest base branch changes before applying other updates. Defaults to false."
789789
},

actions/setup/js/types/safe-outputs.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ interface UpdatePullRequestItem extends BaseSafeOutputItem {
235235
body?: string;
236236
/** Update operation for body: 'replace' (default), 'append', or 'prepend' */
237237
operation?: "replace" | "append" | "prepend";
238-
/** When true, merges the latest base branch changes into the pull request branch before other updates */
239-
merge_base?: boolean;
238+
/** When true, updates the pull request branch with the latest base branch changes before other updates */
239+
update_branch?: boolean;
240240
/** Optional pull request number for target "*" */
241241
pull_request_number?: number | string;
242242
/** Whether the PR should be a draft (true) or ready for review (false) */

0 commit comments

Comments
 (0)