Skip to content

Create GH action for code formatting#223

Draft
anandhu-eng wants to merge 2 commits intodevfrom
anandhu-eng-patch-1
Draft

Create GH action for code formatting#223
anandhu-eng wants to merge 2 commits intodevfrom
anandhu-eng-patch-1

Conversation

@anandhu-eng
Copy link
Copy Markdown
Contributor

✅ PR Checklist

  • Target branch is dev

📌 Note: PRs must be raised against dev. Do not commit directly to main.

✅ Testing & CI

  • Have tested the changes in my local environment, else have properly conveyed in the PR description
  • The change includes a GitHub Action to test the script(if it is possible to be added).
  • No existing GitHub Actions are failing because of this change.

📚 Documentation

  • README or help docs are updated for new features or changes.
  • CLI help messages are meaningful and complete.

📁 File Hygiene & Output Handling

  • No unintended files (e.g., logs, cache, temp files, pycache, output folders) are committed.

🛡️ Safety & Security

  • No secrets or credentials are committed.
  • Paths, shell commands, and environment handling are safe and portable.

🙌 Contribution Hygiene

  • PR title and description are concise and clearly state the purpose of the change.
  • Related issues (if any) are properly referenced using Fixes # or Closes #.
  • All reviewer feedback has been addressed.

@anandhu-eng anandhu-eng requested a review from a team as a code owner April 6, 2026 06:21
@anandhu-eng anandhu-eng marked this pull request as draft April 6, 2026 06:22
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

🤖 AI PR Review Summary\n\nAdds a GitHub Actions workflow to automatically format Python files on every push, excluding commits made by the automation bot itself. The workflow installs autopep8, formats modified Python files, and commits any changes back to the repository. Risks include potential conflicts or unintended formatting changes that may disrupt ongoing work. The design relies on a GitHub App token for authentication and uses a simple diff-based file filter, which may miss edge cases such as renamed or deleted files.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

🤖 AI PR Review Summary\n\nThis PR updates the CLA workflow to expand the allowlist for automated users and introduces a new GitHub Actions workflow for automatic Python code formatting using autopep8. The formatting workflow runs on all branches except when triggered by the mlc-automations user, installs dependencies, formats changed Python files, and commits any changes back to the repo. Risks include potential unintended commits if formatting changes are applied unexpectedly and possible permission issues with the GitHub token. The design is straightforward but could benefit from additional safeguards and clearer filtering of files to format.

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.

1 participant