Skip to content

Format Bot for CI #18554

Open
Enhancement
@bushrat011899

Description

@bushrat011899

What problem does this solve or what need does it fill?

It's very common for either typos, cargo fmt, and/or taplo fmt to fail during CI, requiring a usually trivial commit where the relevant tool is used. This also occurs when a reviewer suggests changes to a PR, since the suggestion may require formatting changes which are either hard or impossible to include in a suggestion block.

What solution would you like?

One or more GitHub Actions which can run the relevant linter and create a suggestion which can be applied to a PR. Crucially, this is not an automatic fix for the PR, it just allows the fix to be done entirely from the web or application UI. This is especially helpful for maintainers who have permission to modify PRs, since they could (for example) upstream main, suggest some minor fixes, and then apply suggested formatting changes all in one sitting without switching context.

What alternative(s) have you considered?

Could do nothing. This is an annoyance at most. But if we can automate the process, why not?

Additional context

  • An example of this can be found in the Suggest Changes Action.
  • CI permissions can be challenging to get right, so I would encourage any CI experts to weigh in on the potential risks of such a bot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Build-SystemRelated to build systems or continuous integrationC-Code-QualityA section of code that is hard to understand or changeC-FeatureA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!S-Needs-DesignThis issue requires design work to think about how it would best be accomplished

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions