Skip to content

Refuse @jekyllbot: merge when Release Please workflow is present on the PR base branch#131

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/refuse-merge-comment-request
Draft

Refuse @jekyllbot: merge when Release Please workflow is present on the PR base branch#131
Copilot wants to merge 3 commits into
mainfrom
copilot/refuse-merge-comment-request

Conversation

Copy link
Copy Markdown

Copilot AI commented May 13, 2026

Jekyll uses Release Please instead of the legacy jekyllbot merge flow, so merge-command comments should not execute in that mode. This update makes merge handling resilient by detecting Release Please on the PR’s base branch and responding with guidance instead of merging.

  • Release-Please-aware merge gate

    • MergeAndLabel now reads PR metadata first and checks for .github/workflows/release-please.yml on pr.base.ref.
    • If present, the handler exits early and does not call PullRequests.Merge.
  • User-facing refusal response

    • Added a dedicated refusal reply posted to the PR thread when @jekyllbot: merge is used in a Release Please repo.
    • Reply points maintainers to the merge documentation URL.
  • Targeted implementation additions

    • Added hasReleasePleaseWorkflowOnBranch(...) to check workflow-file existence via Repositories.GetContents.
    • Added replyWithReleasePleaseMergeRefusal(...) to centralize refusal comment behavior.
releasePleaseEnabled, err := hasReleasePleaseWorkflowOnBranch(context, owner, repo, prInfo.GetBase().GetRef())
if err != nil { return context.NewError(...) }

if releasePleaseEnabled {
	if err := replyWithReleasePleaseMergeRefusal(context, owner, repo, number); err != nil {
		return context.NewError(...)
	}
	return nil
}

Copilot AI changed the title [WIP] Refuse merge comment request when using Release Please Refuse @jekyllbot: merge when Release Please workflow is present on the PR base branch May 13, 2026
Copilot finished work on behalf of parkr May 13, 2026 17:29
Copilot AI requested a review from parkr May 13, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refuse merge comment request when repository is using Release Please

2 participants