[Git][ghc/ghc][master] ci: accept modified changelog.d entries in lint-changelog
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: a563cb27 by Simon Jakobi at 2026-10-02T17:37:36-04:00 ci: accept modified changelog.d entries in lint-changelog The changelog guide says to extend an existing entry rather than add a new one when the feature is already documented. lint_changelog only counted added files, so such MRs failed before the validator ran. Fixes #27779. Assisted-by: Claude Fable 5.1 - - - - - 1 changed file: - .gitlab/ci.sh Changes: ===================================== .gitlab/ci.sh ===================================== @@ -982,23 +982,24 @@ function lint_changelog() { exit 0 fi - # Check that the MR adds at least one changelog entry. + # Check that the MR adds or modifies at least one changelog entry. git fetch --depth=1 \ "$CI_MERGE_REQUEST_PROJECT_URL" \ "$CI_MERGE_REQUEST_DIFF_BASE_SHA" - local added - added=$(git diff --name-only --diff-filter=A \ + local entries + entries=$(git diff --name-only --diff-filter=AM \ "$CI_MERGE_REQUEST_DIFF_BASE_SHA..$CI_COMMIT_SHA" -- \ 'changelog.d/' | grep -v '^changelog.d/config$' || true) - if [ -z "$added" ]; then + if [ -z "$entries" ]; then error "No changelog entry found in changelog.d/" - echo "Please add a changelog entry file describing your user-facing changes." + echo "Please add a changelog entry file describing your user-facing changes," + echo "or add this MR to the 'mrs' field of an existing entry." echo "If this MR does not need a changelog entry, apply the 'no-changelog' label." exit 1 fi - echo "Found changelog entries: $added" + echo "Found changelog entries: $entries" # Build changelog-d with the bootstrap compiler and validate all entries # (checks required fields, section names, and the MR number). View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a563cb271a0adc746193456eefd4ad69... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a563cb271a0adc746193456eefd4ad69... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Marge Bot (@marge-bot)