-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Create a pull request instead of committing directly #16
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me otherwise, though I would prefer a force push onto a separate branch and open a pr (if one doesn't exist) and let the maintainers merge it 😄
run: | | ||
git add ${{ inputs.working-directory }} || true | ||
git commit -m "chore: formatting filenames" || true | ||
|
||
git push origin HEAD:$GITHUB_REF || true | ||
gh pr create --base ${GITHUB_REF##*/} --head formatting_files-${{ github.sha }} --title 'chore: formatting filenames' --body 'Formatted filenames (see the diff. for changes).' | ||
gh pr merge --admin --merge --subject 'chore: formatting filenames' --delete-branch | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW on a personal level, I really think CI checks should help find out the problems for the contributors not fix them so I think fixing the filenames into the correct format automatically means that the contributor really never learns to read the contribution guidelines 😅 - our check should indicate to them that there is a problem with their PR with a comment or something instead of fixing it for them.
EDIT: This argument doesn't apply to the directory.md file since that our problem not the contributors problem 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI actually updates the filenames in case the PR creator didn't follow our guidelines.
In this case, it would create a PR to their fork and update it automatically.
But, sometimes GitHub Actions aren't enabled in forks, which then will be updated in our repository in case anything was missed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I have time to get back to this now, hehe.
I agree with you. Should I edit it so that the action fails if there's anything found, and specify where the error is?
EDIT: I sent you a few messages via Discord about this. Let's discuss it if you like. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been off discord for a while haha, I'll check again soon 😄
Co-authored-by: Christian Clauss <cclauss@me.com>
Things added/changed:
GITHUB_REF
). The branch will be later on deleted to keep things clean.