Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use autofix.ci #3111

Merged
merged 2 commits into from
Sep 5, 2023
Merged

ci: use autofix.ci #3111

merged 2 commits into from
Sep 5, 2023

Conversation

scarf005
Copy link
Member

@scarf005 scarf005 commented Sep 1, 2023

Summary

SUMMARY: Infrastructure "Apply automated formatting commit to PRs using autofix.ci to improve PR formatting experience"

Purpose of change

image

Details

image

image

Current method of fixing formatting issues on github is painful:

  • has to click a lot to fix(commit) individual formatting errors
  • spams PR with github actions comments, making it hard to distinguish from actual conversations

Describe the solution

used https://autofix.ci to automatically commit format fixes to PR.

Describe alternatives you've considered

disable reviewdog suggestion, however some form of auto formatting would help a11y for contributors not familiar with CLI tools.

Testing

to correctly mimic production environment (opening a PR from fork of a organization repo), i've created following PR: scarf-roguelike#4

which is my repo's BN (fork) -> my organization's BN (fork)

they seem to work properly, and thanks to @rtizzy, autofix.ci app is enabled on BN.

Additional context

commit made by <autofix.ci>:

image

commit history:

image

https://github.com/scarf-roguelike/Cataclysm-BN/pull/4/files/f7c5dba1f9e10fef1d3c95641257b8b57bca547d..4725cc5df751c8f34eb96eaf0fb37f66dec12214

@olanti-p
Copy link
Contributor

olanti-p commented Sep 1, 2023

I feel this needs a warning somewhere in the PR template or the contributor docs.
If the bot pushes a commit to the branch, and a contributor is fairly new to git, they may not know they'll need to pull the changes before pushing their own.

@scarf005
Copy link
Member Author

scarf005 commented Sep 2, 2023

added warning in PR template. I wanted the workflow to also attach comment on malformed PR too, but due to github actions security limitations, it might get a bit complicated.

autofix-ci/action#7

Copy link
Contributor

@olanti-p olanti-p left a comment

Choose a reason for hiding this comment

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

LGTM

@scarf005 scarf005 merged commit c568122 into cataclysmbnteam:upload Sep 5, 2023
@scarf005 scarf005 deleted the autofix-ci branch September 5, 2023 22:41
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