Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate Release Cycles (Implement Changesets or other relevant solution) #3047

Open
jasonbahl opened this issue Feb 15, 2024 · 5 comments
Open
Assignees
Labels
scope: build scripts Affects build scripts, CI workflows, and automation. Status: Discussion Requires a discussion to proceed Type: Chore (updating CI tasks etc; no production code change)

Comments

@jasonbahl
Copy link
Collaborator

jasonbahl commented Feb 15, 2024

As a WPGraphQL plugin contributor, I want to create a release workflow that leverages changesets in order to assist with scheduling releases and mitigate human error.

Acceptance Criteria

Changesets is implemented in the following repos:

Technical Details

@jasonbahl jasonbahl changed the title wp-graphql Implement Changesets Feb 15, 2024
@jasonbahl jasonbahl transferred this issue from wp-graphql/wpgraphql-ide Feb 15, 2024
@jasonbahl jasonbahl added the scope: build scripts Affects build scripts, CI workflows, and automation. label Feb 15, 2024
@justlevine
Copy link
Collaborator

Related: #3003

I strongly recommend leaning into Conventional Commits for docs/versioning instead of something like Changesets that imo adds more friction than value

@justlevine justlevine added Status: Discussion Requires a discussion to proceed Type: Chore (updating CI tasks etc; no production code change) labels Feb 15, 2024
@jasonbahl
Copy link
Collaborator Author

@josephfusco and I discussed this a bit further.

We see a path forward where we can leverage changesets to reduce some manual maintainer work for releases, without increasing the burden on contributors.

My idea is that we can leverage our existing lint-pr workflow that enforces "Conventional Pull Request" titles and automate changeset commits from that.

If a PR is opened with a valid Conventional PR, then either a changeset commit is added to the PR itself or a Changeset commit is added at the time the PR is merged (this is likely the least impact on a contributor and maintainer's existing workflows).

I see the workflow as something like:

  • Contributor opens PR
  • Lint-PR workflow runs
  • Contributor (or maintainer) fixes PR title if the title is invalid
  • PR is reviewed as normal
  • PR is merged
  • Workflow runs upon merge automatically adding a changeset commit to the develop branch using the Conventional PR title to describe what changed for the changeset.
  • Releases use whatever other Changeset automation to gather all changesets, update changelog, update version numbers, update @since @todo tags, etc.

I think this could lead to a "best of both worlds" where maintenance burden is reduced and contributors don't have to have any burden passed to them. 🤷🏻‍♂️

We plan to explore some workflows in the wpgraphql-ide repo to see if we can come up with some patterns/workflows that improve maintainer efficiency but do not increase contributor complexity/effort.

@justlevine
Copy link
Collaborator

I think this could lead to a "best of both worlds" where maintenance burden is reduced and contributors don't have to have any burden passed to them. 🤷🏻‍♂️

Perhaps it help me if I understand what exactly the best from "world" of changesets is supposed to be.

From the above flow it doesn't actually seem like we need changesets either. Further, creating changesets as a separate commit means the changelogs generated are likely to be pointless or partial and unhelpful. (Hopefully there's a way to solve this with Changeset's config, but again why bother when Conventional Commits is already a SemVer implementation)

The workflow can be simplified sans-changesets as:

* Contributor opens PR
* Lint-PR workflow runs
* Contributor (or maintainer) fixes PR title if the title is invalid.
* PR is reviewed as normal
* PR is merged
- * Workflow runs upon merge automatically adding a changeset commit to the develop branch using the Conventional PR title to describe what changed for the changeset.
- * Releases use whatever other Changeset automation to gather all changesets, update changelog, update version numbers, update @since @todo tags, etc.
+ * Releases use Conventional Commits prefixes to update changelog, update the since/todo tags etc.

I'm gonna hold off on any other feedback until I see something reviewable in graphql-ide, the above is for your consideration while experimenting with patterns.

@jasonbahl
Copy link
Collaborator Author

Ya the outcome might even be not using changesets 🤷‍♂️

I think we made a mistake of suggesting a solution too early.

The problem is:

How do we reduce some of manual labor and human mistakes involved in the current release process.

Changesets was suggested but may or may not prove to be the correct outcome.

@jasonbahl
Copy link
Collaborator Author

related: #3003

@jasonbahl jasonbahl changed the title Implement Changesets Automate Release Cycles (Implement Changesets or other relevant solution) Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: build scripts Affects build scripts, CI workflows, and automation. Status: Discussion Requires a discussion to proceed Type: Chore (updating CI tasks etc; no production code change)
Projects
Status: 💬 In Discussion
Development

No branches or pull requests

3 participants