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

ci: set next-major branch as base branch for bump action #468

Merged
merged 2 commits into from
Feb 11, 2022

Conversation

smoya
Copy link
Member

@smoya smoya commented Feb 7, 2022

Description

This PR changes the base branch for the bump action so it only applies to dependants of thenext-major branch, a branch that was recently created to work on the next major version (#401).

Note that the target branch is (and should be) next-major.

Related issue(s)
#401

@smoya
Copy link
Member Author

smoya commented Feb 9, 2022

I need to confirm this PR does what I expect it does. Would you @derberg mind clarifying the following? 🙏

Any change made to next-major branch needed to be released by semantic-release, will trigger a version bump on all repositories that depend on that next-major release tag. Is that right?
On the other side, next-major branch would need to stay up-to-date with master. Is this something done automatically by any other action, or rather we need to update it manually?

Thanks!

cc @jonaslagoni as he also had this concerns

@derberg
Copy link
Member

derberg commented Feb 10, 2022

I need to confirm this PR does what I expect it does

The only thing that this PR is missing is being up to date with master that contains the change that was done in workflows with this PR -> #470 The bump workflow update to v4. The v4 release provided support for base_branch

Any change made to next-major branch needed to be released by semantic-release

in other words, changes merged to next-major branch in this repo, will be released by semantic-release if it is configured with next-major in package.json in next-major branch. This is typical workflow handled by release workflow

will trigger a version bump on all repositories that depend on that next-major release tag

this is done by bump workflow. With v4 of bump action, it will create PRs in all repositories that depend on parser and have next-major branch. PR with fix: prefix, with updated package.json (with pre release version - because after you merge this PR, bump workflow, will run from next-major branch, checkout repo from that branch after pumping pre release in parser package.json, and will pick proper version with https:/derberg/npm-dependency-manager-for-your-github-org/blob/main/lib/index.js#L21 ) will be opened against next-major branch. And then again, bot will handle merge and release in the other repo

TODO: if we want Generator to handle that, next-major has to be created there too, and semantic-release configured to support that branch for pre releases

On the other side, next-major branch would need to stay up-to-date with master. Is this something done automatically by any other action, or rather we need to update it manually?

This (automated update) can be achieved but you just need to open a PR from next-major branch to master branch (just mark do-not-merge for now). This is not yet enabled for other actors than bots, but you can try to hack the system. I created spec release branches long before release like #433 for the same reasons that you have, but forgot to hack the system 🤦🏼 You just need to add add autoapproved label to your PR -> https:/asyncapi/parser-js/blob/master/.github/workflows/autoupdate.yml

I hope that makes sense. So bot will merge master into next-major only if you have PR opened and proper label. And of course if there are no merge conflicts.

If something fails when I'm out, ping @magicmatatjahu that have pretty similar setup in react-component (at least the part about publishing pre releases and next branch)

@sonarcloud
Copy link

sonarcloud bot commented Feb 11, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@smoya
Copy link
Member Author

smoya commented Feb 11, 2022

Branch is now up-to-date with master so by what @derberg mentioned in #468 (comment), it seems we are good to go now.

@smoya
Copy link
Member Author

smoya commented Feb 11, 2022

/rtm

@asyncapi-bot asyncapi-bot merged commit 7c8cd44 into asyncapi:next-major Feb 11, 2022
@smoya
Copy link
Member Author

smoya commented Feb 11, 2022

Wait... why did the bot merged this PR when there was no +1 from any Code Owner 🤯 ?
I added the /rtm because in case an Owner approved it, to get it merged automatically (as there was nothing else from my side to change).

@smoya
Copy link
Member Author

smoya commented Feb 11, 2022

Pinging Code Owners @fmvilas @magicmatatjahu @jonaslagoni @derberg.

I think some config is missing in this repository regarding branch protection. A PR shouldn't be merged if there is no +1 of at least one Code Owner. This should be configured in the repository settings, under branch protection rules iirc.

@smoya smoya deleted the next-major branch February 11, 2022 11:27
@magicmatatjahu
Copy link
Member

magicmatatjahu commented Feb 11, 2022

Why did you remove next-branch? I think that we can always change config for given branch if branch exists 😅

EDIT: OK, it was a next-major in your fork, not in upstream master 😆 Sorry!

@jonaslagoni
Copy link
Member

I think some config is missing in this repository regarding branch protection. A PR shouldn't be merged if there is no +1 of at least one Code Owner. This should be configured in the repository settings, under branch protection rules iirc.

It should 👍

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 1.15.0-2022-04-release.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 1.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants