Skip to content

Conversation

@mhucka
Copy link
Collaborator

@mhucka mhucka commented Jan 24, 2026

This adds a simple work to clean up the Dependabot description bodies to remove unwanted sections (like the list of commands) and convert the HTML body to Markdown.

The algorithm is simple: look for <details><summary>Commits</summary>, which marks the beginning of a section listing the commits in the upstream repository, and just delete everything in the Dependabot description from that point to the end. This gets rid of the commits list, the Dependabot command summary, and miscellaneous other bits that we don't find useful.

This adds a simple work to clean up the Dependabot description bodies to
remove unwanted sections (like the list of commands) and convert the
HTML body to Markdown.

The algorithm is simple: look for `<details><summary>Commits</summary>`,
which marks the beginning of a section listing the commits in the
upstream repository, and just delete everything in the Dependabot
description from that point to the end. This gets rid of the commits
list, the Dependabot command summary, and miscellaneous other bits that
we don't find useful.
@github-actions github-actions bot added the size: M 50< lines changed <250 label Jan 24, 2026
@mhucka mhucka marked this pull request as ready for review January 24, 2026 06:34
@mhucka mhucka requested a review from pavoljuhas January 24, 2026 06:34
Copy link
Collaborator

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

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

I am not sure about this - a quick dependabot reference can be useful when working on the PR. After this change maintainers would need to fish it out from the first message history which can be confusing.

I am approving in case you feel it is worth that risk.

@mhucka
Copy link
Collaborator Author

mhucka commented Jan 27, 2026

I am not sure about this - a quick dependabot reference can be useful when working on the PR. After this change maintainers would need to fish it out from the first message history which can be confusing.

I am approving in case you feel it is worth that risk.

By "dependabot reference", do you mean the list of dependabot commands that it adds to the PR, or something else? If it's that list of commands, it would be easy enough to append a link to this page after munging the PR description. That would keep the PR description short, and perhaps be more useful.

@pavoljuhas
Copy link
Collaborator

pavoljuhas commented Jan 27, 2026

By "dependabot reference", do you mean the list of dependabot commands that it adds to the PR, or something else? ...

Yes, the list of dependabot commands.

If it's that list of commands, it would be easy enough to append a link to this page after munging the PR description.

Yes, that would however still introduce an off-topic info to the commit message (or require a manual edit). I gave the clean-up code a test run on the description of quantumlib/Cirq#7779 which left a What's Changed and Changelog sections for the first package; still too much non-relevant information. I feel attempts to transform the description automatically would be fragile should dependabot decide to change message formatting.

For cirq I plan to just add a simple blocking check on the commit message length.

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

Labels

size: M 50< lines changed <250

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants