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

[misc] feat: introduce a style bot. #10274

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

[misc] feat: introduce a style bot. #10274

wants to merge 3 commits into from

Conversation

sayakpaul
Copy link
Member

What does this PR do?

This PR introduces a workflow for allowing us to use the GitHub Actions bot to do @bot /style on PRs that are close to merging but cannot be merged because of styling issues.

I have experimented with the workflow in this dummy repository: https://github.com/sayakpaul/poc-style-bot.

This is how it'd look like:
image

Workflow run: https://github.com/sayakpaul/poc-style-bot/actions/runs/12366322159

@hlky possible for you to give this a look and try it out?

Copy link
Collaborator

@hlky hlky left a comment

Choose a reason for hiding this comment

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

This type of workflow event will only trigger if the workflow is on the default branch so we can't test it here, but it appears correct and is working on your test repo. My only comment is that make style && make quality can just be make style and sometimes we need to do ruff check $(check_dirs) setup.py --fix --unsafe-fixes, probably better to do --unsafe-fixes manually though.

https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#issue_comment

This event will only trigger a workflow run if the workflow file is on the default branch.

@sayakpaul
Copy link
Member Author

an just be make style and sometimes we need to do ruff check $(check_dirs) setup.py --fix --unsafe-fixes, probably better to do --unsafe-fixes manually though.

Yeah usually make style && make quality is the command we're looking into using. Anything other than that, should be applied manually, IMO.

This type of workflow event will only trigger if the workflow is on the default branch so we can't test it here

Yeah exactly. Sorry, I should have made it clear. My ask was more about checking the structure of the workflow and the dummy repo I tested it on.

@DN6 could you give this a look too?

@sayakpaul sayakpaul requested a review from DN6 December 19, 2024 03:01
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