Skip to content

Introduce pre-commit as a GitHub automated action#10949

Closed
DelazJ wants to merge 3 commits intoqgis:masterfrom
DelazJ:qa_action
Closed

Introduce pre-commit as a GitHub automated action#10949
DelazJ wants to merge 3 commits intoqgis:masterfrom
DelazJ:qa_action

Conversation

@DelazJ
Copy link
Copy Markdown
Collaborator

@DelazJ DelazJ commented Apr 24, 2026

This is an attempt to instaure the pre-commit checks in Github actions and ensure that we catch errors from any contributors.

The content is highly inspired by the one in code repo and I must confess that I do not understand the whole logic. I just know that it quite works well there so let's try here also. I also picked some formatting from #10856.

@timlinux @3nids May I request your review please ? I don't know if there are additional things to set at the repo level e.g.. Thanks.

@DelazJ DelazJ added the Backend label Apr 24, 2026
@3nids
Copy link
Copy Markdown
Member

3nids commented Apr 24, 2026

I would recommend trying to use pre-commit.ci for this repo. We could not do this with QGIS due to its size but I would expect this to work for this one

@DelazJ
Copy link
Copy Markdown
Collaborator Author

DelazJ commented Apr 24, 2026

Thanks @3nids.
In our .pre-commit-config.yaml file, we have:

ci:
autofix_prs: true
autoupdate_schedule: quarterly

I thought this was enough but nothing happens these last weeks. Browsing the code repo I can't see anything obvious (see e.g. https://github.com/qgis/QGIS/pull/61652/changes#diff-63a9c44a44acf85fea213a857769990937107cf072831e1a26808cfde9d096b9). So can you please indicate what particular action we need to take?

@3nids
Copy link
Copy Markdown
Member

3nids commented Apr 24, 2026

it needs to be enabled from pre-commit.ci
I just went to do it, but I might have insufficient rights, and I could only trigger a request. So the admins of the QGIS org on Github will be received a notification to accept this.
Then it should be all good.

@3nids
Copy link
Copy Markdown
Member

3nids commented Apr 24, 2026

The main advantage of running it via pre-commit.ci is that you can have autofixing of PRs coming from forks which is not possible when you do it with a workflow.

@DelazJ
Copy link
Copy Markdown
Collaborator Author

DelazJ commented Apr 24, 2026

Merci @3nids

@DelazJ DelazJ closed this Apr 24, 2026
@DelazJ DelazJ deleted the qa_action branch April 25, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants