Skip to content

Run Prettybot's cleanup with the repo's profile - #347

Merged
matt-richardson merged 1 commit into
mainfrom
mattrichardson/prettybot-profile-and-autoapprove
Aug 12, 2026
Merged

Run Prettybot's cleanup with the repo's profile#347
matt-richardson merged 1 commit into
mainfrom
mattrichardson/prettybot-profile-and-autoapprove

Conversation

@matt-richardson

Copy link
Copy Markdown
Contributor

Why

Prettybot has never applied this repo's ReSharper settings. The container's /scripts/prettybot.sh runs jb cleanupcode "$SOLUTIONFILE" with no --profile, and per jb cleanupcode --help that means "Full cleanup profile is used if nothing specified." No settings key changes the CLI default — the profile has to be passed on the command line.

So the Octopus Deploy profile in OctoVersion.sln.DotSettings was being ignored in favour of ReSharper's built-in Full Cleanup. Full Cleanup includes "Arrange argument style", which is why #346 reverted the named maxVersionLength: arguments back to positional.

Prettybot PRs were also never auto-approved, because renovate-approve-pr.yaml gates on the autoapprove label and gh pr create passed no label. The actor half of that condition already matched. Separately, the query that closes superseded PRs looked for github-actions[bot] while the PRs are opened by team-builds-bot, so it never found anything and old Prettybot PRs accumulated.

Notes

Measured against the real tool-resharper-cli:latest container on a clean checkout of main: the current command strips all 17 named-argument call sites and touches 5 files; with --profile none are stripped and 2 files are touched.

Invoking jb directly means this repo no longer uses the shared prettybot.sh. That script is still wrong for every other repo using the container — DPT-3156 covers fixing it centrally, which is a deliberate org-wide behaviour change rather than something to slip in here.

Applying the profile is not a no-op. It still reorders type members, rewraps the CapPreReleaseTag arguments under MAX_INVOCATION_ARGUMENTS_ON_LINE=4, and strips a trailing newline. Expect a smaller Prettybot PR after this merges, not an empty one, and #346 should be closed and left to regenerate.

Linear: DPT-3156, DPT-3157

🤖 Generated with Claude Code

The container's prettybot.sh runs cleanupcode without --profile, which
applies ReSharper's built-in Full Cleanup rather than the Octopus Deploy
profile in OctoVersion.sln.DotSettings.

Also label Prettybot PRs autoapprove so the approve-and-merge workflow
runs, and look for superseded PRs under the account that actually opens
them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@matt-richardson
matt-richardson requested a review from a team as a code owner August 12, 2026 02:27

@lbec-octopus lbec-octopus left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice

@matt-richardson
matt-richardson merged commit 3eb9d70 into main Aug 12, 2026
4 checks passed
@matt-richardson
matt-richardson deleted the mattrichardson/prettybot-profile-and-autoapprove branch August 12, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants