Skip to content

GitLab Next

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 39,511
    • Issues 39,511
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,222
    • Merge requests 1,222
  • Requirements
    • Requirements
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Merge requests
  • !55537

Merged
Created Mar 02, 2021 by Yorick Peterse@yorickpeterseMaintainer7 of 7 tasks completed7/7 tasks

Ignore reverted commits when generating changelogs

  • Overview 32
  • Commits 1
  • Pipelines 5
  • Changes 9

What does this MR do?

When generating changelogs for a range of commits, any commits both added and reverted in that range are ignored. This works by looking for commits with the pattern "This reverts commit X", then ignoring the commits with the mentioned SHA.

Because commits are retrieved in reverse order (= newest first), and revert commits always come after the commit they revert, we can keep processing commits in batches; instead of having to first load all of them in memory. This means the number of Gitaly calls remains the same.

As part of these changes, CommitsWithTrailerFinder is renamed to ChangelogCommitsFinder, as its purpose is now more specific to the process of generating changelogs; instead of being a generic "give me commits with trailer X" finder.

See gitlab-com/gl-infra/delivery#1583 (closed) for more information.

Does this MR meet the acceptance criteria?

Conformity

  • 📋 Does this MR need a changelog?
    • I have included a changelog entry.
  • Documentation (if required)
  • Code review guidelines
  • Merge request performance guidelines
  • Style guides
  • Database guides
  • Separation of EE specific content
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: changelog-ignore-reverted-commits

Enable Gitpod?

To use Gitpod you must first enable the feature in the integrations section of your user preferences.

Cancel Enable Gitpod