-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[build] fix lint problems automatically #16780
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
base: trunk
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||
.github/workflows/ci-rbe.yml
Outdated
| fi | ||
| git apply changes.patch | ||
| rm changes.patch | ||
| # For same-repo PRs, commit the fix |
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.
Does the auto formatting only works if we are making a PR from this repo's branch only? Anyone else who makes a PR from their fork won't benefit from this change.
I don't think we can commit to a fork using github CI, so this seems like the only option.
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.
Actually, good point, there's a checkbox to allow maintainers to edit on forks. Let me support that. Check out the update.
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 don't know if its true but if I ask AI, it says this won't work - using github.event.pull_request.maintainer_can_modify == true does not grant GitHub Actions any extra rights.
And it advises against this practice due to security issues (fork case only). We should first check and validate this.
User description
💥 What does this PR do?
🔧 Implementation Notes
We could make everything wait for format to be done first, it might even be more performant, but this was easier for now.
This PR shows how it works.
I committed a badly formatted ruby file.
The Formatter run and failed, so the Commit Fixes job ran
https://github.com/SeleniumHQ/selenium/actions/runs/20449690944
New commit reran the tests, and formatter passed and commit fixes was skipped:
https://github.com/SeleniumHQ/selenium/actions/runs/20449865466
PR Type
Enhancement
Description
Automatically commit formatting fixes to PRs instead of failing
Add new
commit-fixesjob that applies patch and pushes changesDownload format changes artifact from format job
Handle same-repo vs fork PRs with different strategies
Diagram Walkthrough
File Walkthrough
ci-rbe.yml
Add automatic formatting fix commit workflow.github/workflows/ci-rbe.yml
artifact-name: format-changesparameter to format job to exportpatch file
commit-fixesjob that runs after format job on failuregit applyfor forks
PR types