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

Use present tense in automated changelog entries #41646

Merged
merged 3 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/files/renovate-post-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ for DIR in $(git -c core.quotepath=off diff --name-only HEAD | sed -nE 's!^(proj
echo "Adding change file for $SLUG"
cd "$DIR"

changelogger_add 'Updated package dependencies.' '' --filename="${CHANGEFILE}" --filename-auto-suffix
changelogger_add 'Update package dependencies.' '' --filename="${CHANGEFILE}" --filename-auto-suffix
cd "$BASE"
done

Expand Down
4 changes: 2 additions & 2 deletions tools/changelogger-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ for DS in $( git -c core.quotepath=off diff --name-only projects | sed -E -e 's!
debug " $DS already has an uncommitted change entry file, skipping"
elif ! git diff --quiet -- . ":!./composer.lock"; then
debug " $DS has non-lockfile changes"
changelogger_add 'Updated package dependencies.'
changelogger_add 'Update package dependencies.'
else
debug " $DS has lockfile changes only"
changelogger_add '' 'Updated composer.lock.'
changelogger_add '' 'Update composer.lock.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you did this one, you should probably do

do_changelogger "$SLUG" '' 'Updated composer.lock.'

as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fi
done
cd "$BASE"
Expand Down
4 changes: 2 additions & 2 deletions tools/check-intra-monorepo-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ for SLUG in "${SLUGS[@]}"; do

if $DOCL; then
info "Creating changelog entry for $SLUG"
do_changelogger "$SLUG" 'Updated package dependencies.'
do_changelogger "$SLUG" 'Update package dependencies.'
DOCL=false
fi
fi
Expand All @@ -233,7 +233,7 @@ for SLUG in "${SLUGS[@]}"; do

if $DOCL; then
info "Creating changelog entry for $SLUG"
do_changelogger "$SLUG" 'Updated package dependencies.'
do_changelogger "$SLUG" 'Update package dependencies.'
DOCL=false
fi
fi
Expand Down
4 changes: 2 additions & 2 deletions tools/cli/commands/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ async function addIndirectPlugins( argv, directProjects, changelogFiles ) {
for ( const file of changelogFiles.get( proj ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update the comment just above?

// If it has a changelog file other than "Updated composer.lock" or "Updated dependencies", skip it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const contents = fs.readFileSync( file, 'utf-8' );
if (
! contents.match( /^Comment: Updated composer\.lock\.$/m ) ||
contents.match( /\r?\n\r?\n(?!Updated package dependencies\.[\r\n]*$)\s*\S/ )
! contents.match( /^Comment: Updated? composer\.lock\.$/m ) ||
contents.match( /\r?\n\r?\n(?!Updated? package dependencies\.[\r\n]*$)\s*\S/ )
) {
continue projloop;
}
Expand Down
Loading