Skip to content

Automate Release pull requests (or releases in general). #6

@nerrad

Description

@nerrad

This is a tracking issue for automating release pull requests.

What is a release pull request?

In the Woo Blocks project we are implementing a process that is intended to streamline how we do releases so that they are covered by a checklist of items needing done before merging. This also will assist with potentially establishing a convention for other Woo teams to model.

A "release pull request" is a significant part of this process that documents all that needs to be done before a release tag can be generated and released. You can see examples here.

Things to automate

Here's a shortlist of some of the things I think could be built into the automation for this release process:

  • Read from a pull request template in the project's .github folder and fallback to a default.
  • Hooked in on the branch creation event and respond to branches with release in the branch? Likely something that could eventually be an option. release/{milestone} should be the format of the branch name, and the {milestone} should correspond to a GitHub milestone that has all the work being released.
  • Create the pull request using the found template.
  • Generate a changelog using @wordpress/changelog and add that to the pull request description as well as modify the readme.txt. Then, commit to the branch.
  • Run any additional scripts from the .github folder (allows for customizing elements of the release process)?
  • Generate a production zip file from the branch and attach to the pull request to use for testing.
  • Responds to some trigger (label? approved review? comment in pull? watch for checkbox event in pull request?) that triggers the default release script (or custom provided one) and creates a GitHub tag/release from the branch. Then merges branch to master and closes the pull (if straight merge is possible). Otherwise leaves pull open with comment for manual merge. Will always want to make sure branch is not deleted.
  • Optionally (configurable via option, or checkbox in pull?), after release tag in repo is created, open up a pull request in WooCommerce core for bumping the package version and adding the release pull request content there. This would be more involved to add and require a github token for posting to the WooCommerce repository. If implemented, would be good to add a link to that pull request in originating repo's pull request as a comment.

Along with the above, here's some additional things to consider:

  • need to add some sort of protection so that logic only runs once for the initial pull request creation.
  • how would automating patch releases happen (since those will be based off the initial branch)?
    • Could we see if an existing pull request (title match?) for the branch exist?
    • If there's a closed milestone for the branch, could we automatically detect the next milestone for the patch release and use that to inform creating a new pull request?
    • should we allow for different patch release templates?
  • should we have options for tweaking what meta data is added to the created pull request? At a minimum I think we should add a type: release label, but maybe there'd be additional labels that could be added?
  • should we have options for setting what criteria triggers various events in the release process?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions