A small quality-of-life tool that could bring some merit as discussed in the Maintainers Meeting today was to lift the burden about linting code or docs changes when submitting PRs to Gatsby.
The idea that was decided upon was a GitHub Action that would listen for failing lint checks and then automatically run prettier and make a commit to resolve the failing lint check.
Say I am making a docs change and submit a PR up. If I had some linting bug currently, the checks section of the would fail and I would have to go into CircleCI and go through the logs and check what happened.
With this proposal, that failing check would trigger a GitHub Action for us to run prettier and make a commit automatically without the contributor needing to go back and make a commit and . Then the tests would rerun and could fix the linting issue.
I didn't want to derail meeting, but I don't think this should be totally automatic on failing lint. I've worked with couple repositories like that and it was infuriating (and confusing) that I couldn't (not forcefully) push to my branch because some automatic formatting tool pushed to my branch. This will probably work very nice for docs contribution made from GitHub UI, but will be very frustrating experience for code contribution.
Instead, I would like to propose way for users to trigger formatting - and on failed lint check, just show comment how to trigger that. We already do have formatting bot - we didn't expose it to contributors yet as it is pretty hacky, but we could tighten it a bit and make it available to everyone
Thanks on the input @pieh. Yeah I think a sweetspot between automatic and manual is where these kinds of workflows should belong. Having control of invoking an action with a button press or some comment would be beneficial to have. We can play around with different implementations and see what sticks
Wouldn't it be better to just leave that until the PR is ready to merge? If it's just lint issues, then the merge phase via peril would be able to apply fixes automatically no? (no issues like @pieh cited if you don't need to push again to the branch, since it's at the point of being merged)
Hiya!
This issue has gone quiet. Spooky quiet. 馃懟
We get a lot of issues, so we currently close issues after 30 days of inactivity. It鈥檚 been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 馃挭馃挏
This could be useful to use possibly for this action: https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions
I've worked with couple repositories like that and it was infuriating (and confusing) that I couldn't (not forcefully) push to my branch because some automatic formatting tool pushed to my branch. This will probably work very nice for docs contribution made from GitHub UI but will be a very frustrating experience for code contribution.
@vaibhavbisht06 yeah, the plan as of now is to have a thing where the contributor has to manually trigger this action, so if they want GitHub to format it, it has to be done manually. how that manual trigger occurs, that is still to be detirmined, but I am not going to work on something that is fully automatic
If I'm not mistaken, when I've been committing changes for PRs to Gatsby, a git hook is running Prettier and formatting my code before I submit the PR. So this issue can probably be closed if that's now the case?
Most helpful comment
I didn't want to derail meeting, but I don't think this should be totally automatic on failing lint. I've worked with couple repositories like that and it was infuriating (and confusing) that I couldn't (not forcefully) push to my branch because some automatic formatting tool pushed to my branch. This will probably work very nice for docs contribution made from GitHub UI, but will be very frustrating experience for code contribution.
Instead, I would like to propose way for users to trigger formatting - and on failed lint check, just show comment how to trigger that. We already do have formatting bot - we didn't expose it to contributors yet as it is pretty hacky, but we could tighten it a bit and make it available to everyone