ros2-gbp / ros2-gbp-github-org

ROS 2 Git Built Package (GBP) -- GitHub organization that hosts the release repositories for ROS packages. It also maintains a list of release teams, the list of members per release team.
9 stars 61 forks source link

Add a tool to support automatically maintaining sort order for sorted sections. #477

Closed nuclearsandwich closed 3 months ago

nuclearsandwich commented 3 months ago

I started down this path because I was separately trying to write a script that would insert values in the correct places and decided that it would be easier to write one script to add things wherever and then another to sort the entire section.

As far as I can tell, every sort change in the tf files is one that my own manual editing also performs and these have just accumulated due to the lack of tools like this one to catch them.

While drafting #476, which this replaces, I realized that with a bit more cleverness (always a risk) I could do away with the explicit sigils and this is the result.

nuclearsandwich commented 3 months ago

It would be nice if you could invoke this as part of the CI action.

This is planned for another Friday afternoon.

Does the script return non-zero if changes were made?

It does not. The approach I'd take to CI-ify this would be to run the script and then raise an error if the git workspace is dirty.

nuclearsandwich commented 3 months ago

The reason I'm rebasing fixups is that I'd like to Rebase-merge / fast-forward these commits rather than squashing them so that the content commits are separate from the formatting ones.

nuclearsandwich commented 3 months ago

Of all the... I just said that I wanted to rebase / fast-forward these changes and here I go clicking the squash button the moment I see it lit up. Well I have push powers on latest and just you watch me commit more acts of skullduggery to clean up after my mistakes.

nuclearsandwich commented 3 months ago

latest has been pushed to a356263, achieving the fast-forward. I will answer for my crimes someday.