robotpy/robotpy-commands-v2

Add comment action to format a PR

Opened this issue · 2 comments

allwpilib formats and pushes a commit to a PR if a comment with /format is made.

All the robotpy repos should get this too.

Seems reasonable.

Personally I'd like to switch all RobotPy repos to use pre-commit, like in robotpy/examples#122.

We wouldn't force anyone to actually install the pre-commit hook; it'd just be used to codify formatters and autofixable linters in a single file. Then we could install https://pre-commit.ci to provide autofixing on PRs.

We had to nuke allwpilib's implementation of the /format command (wpilibsuite/allwpilib#7566) due to a security incident, so if we implement autofixing in @robotpy, let's make sure we get it right the first time.