Skip to content

Create a comment with a link to create a pull request #15836

@strawgate

Description

@strawgate

Some projects prefer their agents push a branch and provide a link to create a pull request in its response instead of directly creating the PR itself.

This will come as a total shock, but I am very interested in PR review workflows... There are some interesting PR Review edge cases where this is nice -- for example the author of the PR can't "approve|request changes" on a PR they author. So, if you have a workflow that makes the PR and a workflow that reviews PRs, you won't get an automated "approval" as both are done by the same "author" (github-actions[bot]).

GitHub allows you to embed the branch title and body of a pull request into a hyperlink. Enabling a Create a PR experience. I'm not sure exactly what the best ergonomics would be for the safe output but perhaps something like create-comment-with-pull-request-link which takes pr-title, pr-body, comment-body, etc.

It would then post a comment with the comment-body and then include a link to make the PR in the footer (or something similar).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions