Skip to content

Support explicit auto-merge strategies in safe-outputs.create-pull-request - #49412

Merged
pelikhan merged 10 commits into
mainfrom
copilot/create-pr-support-auto-merge
Aug 1, 2026
Merged

Support explicit auto-merge strategies in safe-outputs.create-pull-request#49412
pelikhan merged 10 commits into
mainfrom
copilot/create-pr-support-auto-merge

Conversation

CopilotAI commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

safe-outputs.create-pull-request could enable auto-merge, but only as a boolean and without controlling the merge strategy. This change allows workflows to request GitHub native auto-merge with an explicit method while keeping existing true/false behavior intact.

  • Config surface

    • Extend safe-outputs.create-pull-request.auto-merge to accept:
      • true / false
      • squash
      • merge
      • rebase
    • Update schema/docs to reflect the new accepted values.
  • Compile-time handling

    • Preserve backward compatibility for existing boolean configs.
    • Validate explicit strategy values during workflow parsing.
    • Serialize strategy values through the safe-output handler config unchanged.
  • Runtime behavior

    • Map explicit strategy values to GraphQL PullRequestMergeMethod.
    • Pass mergeMethod to enablePullRequestAutoMerge only when a strategy is specified.
    • Keep boolean auto-merge: true behavior unchanged so repositories still use their default merge configuration.
  • Coverage

    • Add focused tests for:
      • schema acceptance
      • config parsing/serialization
      • GraphQL auto-merge invocation with and without an explicit method

Example:

safe-outputs:
create-pull-request:
auto-merge: squash

This compiles to a handler config that preserves the selected strategy and enables native auto-merge with SQUASH for the created PR.


Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

run: https://github.com/github/gh-aw/actions/runs/30676859249

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 12.7 AIC · ⊞ 5.7K ·
Comment /souschef to run again


Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Run details: https://github.com/github/gh-aw/actions/runs/30678610470

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 18.9 AIC · ⊞ 5.7K ·
Comment /souschef to run again


Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Run: https://github.com/github/gh-aw/actions/runs/30680808859

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 6.35 AIC · ⊞ 8.1K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Add support for enabling auto-merge on created PRsSupport explicit auto-merge strategies in safe-outputs.create-pull-requestJul 31, 2026
CopilotAI requested a review from pelikhanJuly 31, 2026 22:03
@pelikhan
pelikhan marked this pull request as ready for review August 1, 2026 00:49
CopilotAI review requested due to automatic review settings August 1, 2026 00:50
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot auto-merge true should be squash by default

@github-actions

github-actionsBot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

@github-actions

github-actionsBot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check.

@github-actions

github-actionsBot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

@github-actions

github-actionsBot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds explicit auto-merge strategies while retaining boolean behavior.

Changes:

  • Accepts squash, merge, and rebase.
  • Maps strategies to GraphQL merge methods.
  • Adds schema, documentation, and test coverage.
Show a summary per file
FileDescription
pkg/workflow/create_pull_request.goParses and validates strategies.
pkg/workflow/compile_outputs_pr_test.goTests compilation.
pkg/workflow/safe_outputs_config_generation_test.goTests serialization.
pkg/parser/schemas/main_workflow_schema.jsonExtends the schema.
pkg/parser/schema_test.goTests schema structure.
actions/setup/js/create_pull_request.cjsApplies GraphQL merge methods.
actions/setup/js/create_pull_request.test.cjsTests runtime invocation.
.github/aw/safe-outputs-content.mdDocuments strategy configuration.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment on lines +198 to +207
switch (normalized) {
case "squash":
return { enabled: true, mergeMethod: "SQUASH" };
case "merge":
return { enabled: true, mergeMethod: "MERGE" };
case "rebase":
return { enabled: true, mergeMethod: "REBASE" };
default:
return { enabled: parseBoolTemplatable(value, false) };
}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This concern is addressed in commit 2e1fa40. The parseAutoMergeConfig function now handles "true" explicitly (mapping it to SQUASH), and any unrecognized value triggers core.warning(...) and returns { enabled: false } — so typos like sqaush fail closed with a visible warning instead of silently enabling auto-merge.

"type": "boolean",
"description": "Enable auto-merge for the pull request. When enabled, the PR will be automatically merged once all required checks pass and required approvals are met. Defaults to false.",
"default": false
"description": "Enable auto-merge for the pull request. Accepts true/false or an explicit merge method string (squash, merge, rebase). When enabled, the PR will be automatically merged once all required checks pass and required approvals are met. Defaults to false.",

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regenerated docs/src/content/docs/reference/frontmatter-full.md via node scripts/generate-schema-docs.js — the reference now documents auto-merge with boolean, string (squash/merge/rebase), and GitHub Actions expression formats. Committed in 76ea9f1.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Review: Support explicit auto-merge strategies

The implementation is well-structured and correct.

✅ Correctness

  • parseAutoMergeConfig correctly handles all documented input forms: boolean false/true, string strategy values, and templatable expressions.
  • The GraphQL mutation correctly passes mergeMethod as an optional variable — GitHub's API accepts null for mergeMethod (boolean true path), preserving existing behavior.
  • Go compile-time validation correctly removes auto-merge from BoolFields and adds explicit validation for the expanded value set.
  • Schema uses oneOf with three variants (boolean, enum string, expression pattern) — semantics are sound.

✅ Backward compatibility

  • Existing auto-merge: true/false configurations compile and behave identically to before.

✅ Test coverage

  • JS tests cover explicit strategy and boolean-without-method paths.
  • Go tests cover schema validation, config parsing, and compiled lock file content.

No blocking issues found.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 19.4 AIC · ⊞ 5.3K

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Design Decision Gate — ADR Required

This PR makes significant changes to core business logic (142 new lines across pkg/ and actions/) but does not have a linked Architecture Decision Record (ADR).

📄 Draft ADR committed: docs/adr/49412-extend-auto-merge-to-support-explicit-merge-methods.md — review and complete it before merging.

🔒 This PR cannot merge until an ADR is linked in the PR body.

📋 What to do next
  1. Review the draft ADR committed to your branch — it was generated from the PR diff
  2. Complete the missing sections — add context the AI could not infer, refine the decision rationale, and list real alternatives you considered
  3. Commit the finalized ADR to docs/adr/ on your branch
  4. Reference the ADR in this PR body by adding a line such as:

    ADR: ADR-49412: Extend auto-merge to Support Explicit Merge Methods

Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision.

❓ Why ADRs Matter

"AI made me procrastinate on key design decisions. Because refactoring was cheap, I could always say 'I'll deal with this later.' Deferring decisions corroded my ability to think clearly."

ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you.

📋 Michael Nygard ADR Format Reference

An ADR must contain these four sections to be considered complete:

  • Context — What is the problem? What forces are at play?
  • Decision — What did you decide? Why?
  • Alternatives Considered — What else could have been done?
  • Consequences — What are the trade-offs (positive and negative)?

All ADRs are stored in docs/adr/ as Markdown files numbered by PR number (e.g., 49412-extend-auto-merge-to-support-explicit-merge-methods.md for PR #49412).

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · sonnet46 · 47.8 AIC · ⌖ 15.6 AIC · ⊞ 9.6K ·
Comment /review to run again

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Skills-Based Review 🧠

Applied /tdd and /grill-with-docs — requesting changes on two actionability and documentation gaps.

📋 Key Themes & Highlights

Key Themes

  • Silent runtime failure: parseAutoMergeConfig's default branch quietly disables auto-merge on unrecognized input (typos, future values). A core.warning would surface this in the Actions log.
  • Unit test coverage: parseAutoMergeConfig is only tested end-to-end via main(). Direct unit tests for the "true"/"false" string path, null, and unknown values would make regressions immediately obvious.
  • Documentation gaps: The schema description doesn't mention expression support, and the reference doc line dropped the explicit false default.

Positive Highlights

  • ✅ Clean layered approach: schema → compile-time validation → runtime parsing → GraphQL mutation
  • ✅ Backward compatibility is well-preserved and explicitly tested
  • ✅ Boolean normalization to strings at compile time keeps the runtime handler simple
  • ✅ Comprehensive test coverage across all three layers (schema, Go compile, JS runtime)
  • ✅ GraphQL variable typed as nullable (PullRequestMergeMethod) so undefined correctly omits the argument for auto-merge: true

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 37 AIC · ⊞ 7K
Comment /matt to run again


it("passes an explicit auto-merge method to GraphQL", async () => {
const { main } = require("./create_pull_request.cjs");
const handler = await main({ auto_merge: "rebase", allow_empty: true });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/tdd] The "rebase" string case is tested via main(), but parseAutoMergeConfig has no direct unit tests for the "true" string, "false" string, null, or empty inputs — these fall through to parseBoolTemplatable via the default branch and are easy to regress.

💡 Suggested additions

Export parseAutoMergeConfig and add focused unit tests:

it('treats string "true" as enabled with no method',()=>{expect(parseAutoMergeConfig('true')).toEqual({enabled: true});});it('treats string "false" as disabled',()=>{expect(parseAutoMergeConfig('false')).toEqual({enabled: false});});it('treats null as disabled',()=>{expect(parseAutoMergeConfig(null)).toEqual({enabled: false});});it('treats unknown string as disabled',()=>{expect(parseAutoMergeConfig('unknown')).toEqual({enabled: false});});

The default branch passes the original value (not the lowercased normalized) to parseBoolTemplatable — correct for expression strings, but worth a comment.

@copilot please address this.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exported parseAutoMergeConfig and added a dedicated "parseAutoMergeConfig unit tests" describe block in create_pull_request.test.cjs covering: true (bool and string → SQUASH), false (bool and string → disabled), null, undefined, each explicit strategy, an unrecognized string (warns + disabled), and empty string. Committed in 76ea9f1.

case "rebase":
return { enabled: true, mergeMethod: "REBASE" };
default:
return { enabled: parseBoolTemplatable(value, false) };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/tdd] The default branch of parseAutoMergeConfig silently returns { enabled: false } for any unrecognized string (e.g. a typo like "squahs"). This makes misconfiguration invisible at runtime — the PR just won't auto-merge with no warning or error.

💡 Suggested fix

Log a warning for unrecognized non-boolean, non-expression strings so authors can detect misconfiguration:

default:
if(!/^\$\{\{.*\}\}$/.test(normalized)){// Not a boolean and not an expression — likely a typoconsole.warn(`[auto-merge] Unrecognized value "${normalized}", disabling auto-merge`);}return{enabled: parseBoolTemplatable(value,false)};

Alternatively, emit a core.warning so it shows up in the Actions log.

@copilot please address this.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 2e1fa40. The default branch now calls core.warning(\Unrecognized auto-merge value "${value}". Expected true, false, "squash", "merge", or "rebase". Auto-merge will be disabled.`)and returns{ enabled: false }`, making typos clearly visible in the Actions log rather than silently disabling auto-merge.

]
},
"base-branch": {
"type": "string",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/grill-with-docs] The oneOf for auto-merge includes a GitHub Actions expression variant (pattern: ^\\$\{\{.*\}\}\$), but the description field only mentions true/false or an explicit merge method string. A user relying solely on the schema description won't know expressions are supported.

💡 Suggested fix

Update the description to mention expression support:

"description": "Enable auto-merge for the pull request. Accepts true/false, an explicit merge method (squash, merge, rebase), or a GitHub Actions expression. When enabled, the PR is automatically merged once all required checks pass.",

@copilot please address this.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the auto-merge description in pkg/parser/schemas/main_workflow_schema.json to: "Accepts true/false, an explicit merge method (squash, merge, rebase), or a GitHub Actions expression resolving to any of those values." Schema docs regenerated to reflect the change. Committed in 76ea9f1.

Comment thread.github/aw/safe-outputs-content.md Outdated
allow-empty: false # Optional: create PR with empty branch, no changes required (default: false)
expires: 7 # Optional: auto-close after 7 days (supports: 2h, 7d, 2w, 1m, 1y; min: 2h)
auto-merge: false# Optional: enable auto-merge when checks pass (default: false)
auto-merge: squash # Optional: false/true or merge method squash|merge|rebase for native auto-merge

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/grill-with-docs] The inline comment now says squash as the example value but no longer shows the false default — readers can't tell the default value from this line alone.

💡 Suggested wording
auto-merge: squash # Optional: false (default), true, or merge method: squash|merge|rebase

This makes the default explicit and matches the convention used by neighbouring fields like allow-empty and draft.

@copilot please address this.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the inline comment to # Optional: false (default), true, or merge method: squash|merge|rebase, making the default explicit and matching the convention used by neighbouring fields. Committed in 76ea9f1.

@github-actions

Copy link
Copy Markdown
Contributor

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

🧪 Test Quality Sentinel Report

⚠️Test Quality Score: 68/100 — Acceptable

Analyzed 6 test(s): 4 design, 2 implementation, 1 violation.

📊 Metrics (6 tests)
MetricValue
Analyzed6 (Go: 4, JS: 2)
✅ Design4 (67%)
⚠️ Implementation2 (33%)
Edge/error coverage5 (83%)
Duplicate clusters0
InflationYes (JS: 2.7:1)
🚨 Violations1
TestFileClassificationIssues
it("passes explicit auto-merge method")create_pull_request.test.cjs:264design_testGraphQL mutation verified; behavioral contract enforced
it("preserves boolean auto-merge behavior")create_pull_request.test.cjs:277design_testBackward compatibility verified; edge case (undefined mergeMethod)
TestMainWorkflowSchema_... (modified)schema_test.go:1150design_testSchema structure contract verified; both boolean and enum variants
TestCreatePullRequestAutoMergeMethodConfigcompile_outputs_pr_test.go:665design_testEnd-to-end compilation flow; lock file output verified
TestGenerateSafeOutputsConfigCreate...AutoMergeMethodsafe_outputs_config_generation_test.go:636implementation_testConfig generation logic; JSON structure validated
⚠️ Flagged Issues (1)

Test Inflation in actions/setup/js/create_pull_request.test.cjs: 101 lines added to test vs. 37 lines in production code (2.7:1 ratio, exceeds 2:1 threshold). Primarily due to extensive beforeEach setup block (51 lines) that mocks global.core, global.github, global.context, and global.exec. This setup is necessary for comprehensive mocking but could be refactored into a shared test fixture factory for reusability across future tests.

Mitigation: Setup cost is justified by behavioral verification (GraphQL calls with correct parameters), but future test additions should leverage fixture reuse to reduce inflation.

Verdict

⚠️Failed. 33% implementation tests (threshold: 30%). Test inflation flagged (JS 2.7:1). While design coverage is strong (67%) and edge cases are well-represented, the high implementation test ratio combined with JS test inflation exceeds acceptable thresholds. Recommend refactoring setup fixtures before adding new tests to this describe block.

🧪 Test quality analysis by Test Quality Sentinel · haiku45 · 29.1 AIC · ⊞ 8.4K ·
Comment /review to run again

github-actions[bot]
github-actionsBot previously requested changes Aug 1, 2026

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Test Quality Sentinel: 68/100. 33% implementation tests (threshold: 30%). Test inflation flagged (JS 2.7:1). Review flagged tests in the comment above.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Review verdict: COMMENT

Solid, well-tested extension of auto-merge to support explicit merge strategies (squash/merge/rebase) with backward-compatible boolean handling. One maintainability/consistency concern worth addressing before or shortly after merge.

Themes and highlights
  • Schema change (oneOf boolean/enum/expression-string) follows the existing templatable-field pattern used elsewhere in the schema and is correctly reflected in new schema tests.
  • JS runtime parseAutoMergeConfig correctly maps the new string values to GraphQL mergeMethod, and the GraphQL call site relies on undefined being omitted for the boolean/no-strategy case — this is standard Octokit/GraphQL behavior and is covered by a test asserting mergeMethod: undefined is accepted.
  • Go-side validation of auto-merge (create_pull_request.go ~113-130) diverges from the sibling validateStringEnumField pattern used for protected-files/patch-format in the same function: instead of silently dropping just the bad field, an invalid auto-merge value aborts the entire preUnmarshal callback, which discards the wholecreate-pull-request config (see parseCreateEntityConfig, create_entity_helpers.go:50-52). This is a meaningfully different (and more severe) failure mode than its neighbors, with no test exercising it. Flagged inline.
  • Minor, non-blocking: no test found for an actually-invalid auto-merge string (e.g., a typo like "sqaush") to confirm/document the abort behavior is intentional.

No sub-agent (grumpy-coder) findings were incorporated — analysis here is from an independent manual second pass over the diff and surrounding code paths (config parsing, schema validation ordering, handler serialization).

🔎 Code quality review by PR Code Quality Reviewer · auto · 148.9 AIC · ⊞ 7.8K
Comment /review to run again

Comment on lines +113 to +122
if val, exists := configData["auto-merge"]; exists {
switch v := val.(type) {
case bool:
if v {
configData["auto-merge"] = "true"
} else {
configData["auto-merge"] = "false"
}
case string:
if !isExpression(v) && v != "true" && v != "false" && v != "squash" && v != "merge" && v != "rebase" {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline validation duplicates validateStringEnumField's job but with a stricter, inconsistent failure mode.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced the inline enum validation switch with behavior consistent with validateStringEnumField: invalid string values and unexpected types now delete the auto-merge key and log a debug message rather than returning false. Committed in 76ea9f1.

Comment threadpkg/workflow/create_pull_request.go Outdated
Comment on lines +113 to +128
if val, exists := configData["auto-merge"]; exists {
switch v := val.(type) {
case bool:
if v {
configData["auto-merge"] = "true"
} else {
configData["auto-merge"] = "false"
}
case string:
if !isExpression(v) && v != "true" && v != "false" && v != "squash" && v != "merge" && v != "rebase" {
createPRLog.Printf("Invalid auto-merge value %q", v)
return false
}
default:
createPRLog.Printf("Invalid auto-merge value type %T", val)
return false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This inline switch reimplements enum validation but aborts the entire create-pull-request config on failure, unlike sibling fields.

💡 Inconsistent failure severity vs. validateStringEnumField

Compare with lines 108/111 which use validateStringEnumField for protected-files and patch-format: on an invalid value, that helper just deletes the single bad key and logs a debug message — the rest of the create-pull-request config still parses normally.

This new auto-merge block instead returns false from the preUnmarshal callback (line 124/128), which per parseCreateEntityConfig (create_entity_helpers.go:50-52) causes the whole config to be discarded (return nil). A single typo like auto-merge: sqaush silently disables the entire create-pull-request safe-output, not just auto-merge — a much more severe and surprising blast radius than its sibling enum fields in the same function, with no test covering this abort path.

Suggested fix: reuse validateStringEnumField-style behavior (drop only the bad field with a debug log) instead of aborting, or if aborting is intentional, add an explicit compile-time error surfaced to the user (not just a debug log) plus a regression test asserting the behavior.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the inconsistent blast radius: the invalid-value cases now call delete(configData, "auto-merge") and log the issue instead of return false. This matches validateStringEnumField semantics — a bad auto-merge value silently drops only that field, leaving the rest of the create-pull-request config intact. Committed in 76ea9f1.

CopilotAIand others added 2 commits August 1, 2026 01:15
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
… values
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Great work on extending auto-merge support! 🎯 This PR adds explicit merge strategy control (squash, merge, rebase) to safe-outputs.create-pull-request while maintaining backward compatibility with boolean configs.

What looks solid:

  • Comprehensive test coverage across schema validation, config parsing, and GraphQL invocation
  • Clear design documenting config surface, compile-time handling, and runtime behavior
  • Backward compatibility preserved for existing true/false behavior
  • ADR added for decision rationale

The PR is well-focused, thoroughly tested, and ready for maintainer review.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • patchdiff.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
allowed:
- defaults
- "patchdiff.githubusercontent.com"

See Network Configuration for more information.

Generated by ✅ Contribution Check · auto · 60 AIC · ⊞ 8.7K ·

…nt failure mode, and unit tests
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

CopilotAI commented Aug 1, 2026

Copy link
Copy Markdown
ContributorAuthor

[!WARNING]
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding....

All outstanding review feedback addressed:

  • Fail-closed with warning for unrecognized auto-merge values (e.g. typos like sqaush)
  • Schema description updated to mention GitHub Actions expression support
  • Inline comment in safe-outputs-content.md updated to make default explicit
  • Inconsistent failure mode in create_pull_request.go fixed (drop field instead of aborting whole config)
  • parseAutoMergeConfig exported with 10 focused unit tests covering all input cases
  • Schema docs regenerated

Commits: 2e1fa40, 76ea9f1.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

@copilot please run the pr-finisher skill, follow up on any still-open blocking review state, refresh the branch if GitHub allows it, and rerun the relevant checks once ready. Current context: review comments appear addressed in commit 76ea9f1, but the PR still shows CHANGES_REQUESTED; please confirm whether any resolved threads or stale reviews can now be closed out before handoff. Run details: https://github.com/github/gh-aw/actions/runs/30678610470

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 18.9 AIC · ⊞ 5.7K ·
Comment /souschef to run again

CopilotAI commented Aug 1, 2026

Copy link
Copy Markdown
ContributorAuthor

[!WARNING]
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding....

Here is the full pr-finisher pass:

Checks (local) ✅make fmt (no changes), make lint (0 errors, pre-existing warnings only), make test-unit (full suite, all passing).

Branch ✅ — already up-to-date with main via merge commit 2c05da1.

Review threads ✅ — all 8 in-scope threads now have substantive Copilot replies. Two threads that were missing replies (PRRT_kwDOPc1QR86VkXri about fail-closed warning, PRRT_kwDOPc1QR86VkZK5 about core.warning) were replied to in this pass; the remaining 6 already had replies from commit 76ea9f1. Thread resolution (marking them resolved) requires GraphQL API access that is blocked in this environment — a maintainer can resolve them from the PR Files tab.

CHANGES_REQUESTED reviews — both stale reviews (Matt Pocock Skills Reviewer, Test Quality Sentinel) were submitted against the old commit 7e0d8a9 before all issues were addressed. All concerns they raised have since been fixed in commits 2e1fa40 and 76ea9f1. A maintainer needs to dismiss these stale reviews to unblock the PR.

Checks (CI) ❓ — stale after agent push; the agent cannot re-trigger CI. A human re-trigger (close/reopen the PR or push from a maintainer) is needed for fresh check results.

Hand-off: all agent-actionable work is complete. To merge: dismiss the two stale CHANGES_REQUESTED bot reviews, resolve the open review threads, and re-trigger CI.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

@copilot please run the pr-finisher skill and close out the remaining maintainer-facing blockers. All review threads appear to have follow-up replies, but stale blocking bot reviews still need cleanup before handoff. Please confirm any thread IDs that can now be resolved, dismiss stale github-actions[bot] blocking reviews if all threads are resolved, refresh the branch if GitHub allows it, and rerun the relevant checks once ready. Run details: https://github.com/github/gh-aw/actions/runs/30680808859

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 6.35 AIC · ⊞ 8.1K ·
Comment /souschef to run again

CopilotAI commented Aug 1, 2026

Copy link
Copy Markdown
ContributorAuthor

[!WARNING]
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding....

All agent-actionable work is already complete. Here's the confirmed state:

Thread resolution — All 8 threads have substantive Copilot replies. Attempted to resolve them via GraphQL and the GitHub web UI, but both fail with 422/permission errors. Resolving review threads requires maintainer write access that the Copilot agent does not have. A maintainer must resolve them from the PR Files tab.

Thread IDs ready to resolve:

  • PRRT_kwDOPc1QR86VkXri — fail-closed warning (outdated, replied ✓)
  • PRRT_kwDOPc1QR86VkXrz — schema docs regeneration (outdated, replied ✓)
  • PRRT_kwDOPc1QR86VkZK4 — unit test coverage (not outdated, replied ✓)
  • PRRT_kwDOPc1QR86VkZK5 — core.warning for typos (outdated, replied ✓)
  • PRRT_kwDOPc1QR86VkZK6 — schema description expression mention (not outdated, replied ✓)
  • PRRT_kwDOPc1QR86VkZK7 — inline comment default explicit (outdated, replied ✓)
  • PRRT_kwDOPc1QR86VkeWk — validateStringEnumField consistency (not outdated, replied ✓)
  • PRRT_kwDOPc1QR86VkeWl — blast radius fix (outdated, replied ✓)

Stale blocking reviews — The two CHANGES_REQUESTED reviews (review IDs 4833111972 and 4833113128) are from github-actions[bot] and were submitted against the old commit 7e0d8a9. No "Dismiss review" button is available to the agent — only a maintainer can dismiss bot reviews. The Impeccable Skills Reviewer separately gave an APPROVED review (4833110346) confirming the implementation is correct.

Branch — up-to-date with main (HEAD 9540bf2). make fmt, make lint, make test-unit (full suite) all pass locally.

Required human actions to unblock merge:

  1. Resolve the 8 review threads listed above from the PR Files tab
  2. Dismiss the two stale CHANGES_REQUESTED bot reviews (4833111972, 4833113128)
  3. Re-trigger CI (close/reopen or push)

@pelikhan
pelikhan merged commit 25269b5 into mainAug 1, 2026
37 checks passed
@pelikhan
pelikhan deleted the copilot/create-pr-support-auto-merge branch August 1, 2026 06:24
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.2

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create-pull-request: support enabling auto-merge on the created PR

4 participants

@pelikhan@gh-aw-bot