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

Changelog generator does not read proper commits from release branch due to --first-parent flag #7492

Closed
pomek opened this issue Jun 24, 2020 · 1 comment · Fixed by ckeditor/ckeditor5-dev#654
Assignees
Labels
package:dev squad:devops Issue to be handled by the Devops team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@pomek
Copy link
Member

pomek commented Jun 24, 2020

When we used master as the main branch, --first-parent showed proper commits.

After switching to release, double merge (first: feature branch into master, second: master into release) happens, a lot of commits are skipped.

We need to figure out how to get all commits.

If we won't find a single commit for receiving the commits, probably we need to combine the results of two commands:

  • all merge commits,
  • all non-merge commits directly on the specified branch

Current command: https://github.com/ckeditor/ckeditor5-dev/blob/e9f675076cede4fe19f1a4fd3001959cd3fb63ef/packages/ckeditor5-dev-env/lib/release-tools/utils/getcommits.js#L23-L28

@pomek pomek added type:bug This issue reports a buggy (incorrect) behavior. squad:devops Issue to be handled by the Devops team. package:dev labels Jun 24, 2020
@pomek pomek added this to the iteration 34 milestone Jun 24, 2020
@pomek pomek self-assigned this Jun 24, 2020
@pomek
Copy link
Member Author

pomek commented Jun 25, 2020

The solution:

  • parse commits from the last version to a common commit on master and release branches (let's call it as the base-commit) - checkout to the master, use a range tag..base-commit and checkout to release branch
  • parse commits on release branch use a range: base-commit..HEAD

At the end, we will have two arrays that need to be merged.

mlewand added a commit to ckeditor/ckeditor5-dev that referenced this issue Jul 20, 2020
Fix (env): The `getCommit()` util will return a proper array with commits if the release branch in the project is other than `master`. Due to `--first-parent` flag which is used for collecting the commits, when the release branch is other than `master`, commits made on `master` could not be collected directly from the branch. Now those commits are collected in two ranges: from the last tag to the [base commit](https://git-scm.com/docs/git-merge-base) and from the base commit to HEAD and merged together. Closes ckeditor/ckeditor5#7492.

Other (env): The `generateChangelogForMonoRepository()` task supports `options.releaseBranch` that is passed directly to the `getCommit()` util. See ckeditor/ckeditor5#7492.
mlewand added a commit that referenced this issue Jul 20, 2020
Internal (ckeditor5): Added a release branch to the changelog task. See #7492.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:dev squad:devops Issue to be handled by the Devops team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant