github.com/goreleaser/goreleaser@v1.25.1/www/docs/includes/prs.md (about)

     1  ## Pull Requests
     2  
     3  > Since v1.17
     4  
     5  GoReleaser allows you to, instead of pushing directly to the main branch, push
     6  to a feature branch, and open a pull requests with the changes.
     7  
     8  ### Templates
     9  
    10  > Since v1.19
    11  
    12  GoReleaser will check for a `.github/PULL_REQUEST_TEMPLATE.md`, and set it in
    13  the pull request body if it exists.
    14  
    15  We do that to prevent extra work for maintainers of things like `winget-pkgs`,
    16  `nixpkgs`, and so on.
    17  
    18  ### Cross-repository pull requests
    19  
    20  > Since v1.19
    21  
    22  You can also push to a fork, and open the pull request in the original branch.
    23  
    24  Here's an example on how to set it up:
    25  
    26  ```yaml
    27  # .goreleaser.yml
    28  # ...
    29  something: # can be nix, brews, etc...
    30    - repository:
    31        owner: john
    32        name: repo
    33        branch: "{{.ProjectName}}-{{.Version}}"
    34        pull_request:
    35          enabled: true
    36          base:
    37            owner: mike
    38            name: repo
    39            branch: main
    40  ```
    41  
    42  This will:
    43  
    44  - Try to sync the `john/repo` fork with `mike/repo:main` (if on GitHub).
    45  - Create the files into `john/repo`, in the branch `foo-1.2.3` (assuming
    46    `ProjectName=foo` and `Version=1.2.3`). [^head]
    47  - Open a pull request from `john/repo` into `mike/repo`, with the branch `main`
    48    as target. [^base]
    49  
    50  [^head]: In GitHub's terms, this means `head=john:repo:foo-1.2.3`
    51  [^base]: In GitHub's terms, this means `base=mike:repo:main`
    52  
    53  ### Things that don't work
    54  
    55  - Opening pull requests to a forked repository (`go-github` does not have the
    56    required fields to do it).
    57  - Since this can fail for a myriad of reasons, if an error happen, it'll log it
    58    to the release output, but will not fail the pipeline.