Skip to content

Conversation

@Eijebong
Copy link
Contributor

This replaces the pre-commit.ci app's autoupdate.

The one caveat with this is that it doesn't check for PRs that are already opened on that branch. I did that to keep it as simple as possible. It's not a real issue as github will detect that and close the previous PR and then open a new one but it might be a bit spammy if we don't merge those PRs

This replaces the pre-commit.ci app's autoupdate.

The one caveat with this is that it doesn't check for PRs that are
already opened on that branch. I did that to keep it as simple as
possible. It's not a real issue as github will detect that and close the
previous PR and then open a new one but it might be a bit spammy if we
don't merge those PRs
@Eijebong Eijebong requested a review from a team as a code owner April 11, 2025 12:04
@Eijebong Eijebong requested a review from jcristau April 11, 2025 12:04
@Eijebong
Copy link
Contributor Author

example of it working.

I have this repo where I ran the job on push instead of cron.

https://github.com/Eijebong/test-pr-gha

@ahal
Copy link
Collaborator

ahal commented Apr 11, 2025

I somewhat think it wouldn't be much harder to do this as a Taskcluster cron, but also that it's not worth switching now

@Eijebong
Copy link
Contributor Author

I somewhat think it wouldn't be much harder to do this as a Taskcluster cron, but also that it's not worth switching now

The advantage of this is that we don't have to worry about the token as github provides it for us in the workflow.

@ahal
Copy link
Collaborator

ahal commented Apr 11, 2025

The advantage of this is that we don't have to worry about the token as github provides it for us in the workflow.

True!

One trick we could use is that because taskcluster-github is guaranteed to be installed and it already has read&write PR access, we could authenticate as that app. We'd have to be comfortable storing its private key in a TC secret though. And it's definitely more complex than "it just works out of the box" ><

Eijebong added a commit to Eijebong/mozilla-taskgraph that referenced this pull request Apr 14, 2025
Since we're using the uv hook, pre-commit requires the internet to work
properly which the pre-commit.ci app ran jobs don't have access to.
These two workflows are meant to replace the app entirely by doing both
checking on PRs/main and auto updates. It means that we do lose the
autofix feature, but it's that or throwing away the uv-lock hook.

Original work done in taskcluster/taskgraph#677
and taskcluster/taskgraph#678
@Eijebong
Copy link
Contributor Author

One trick we could use is that because taskcluster-github is guaranteed to be installed and it already has read&write PR access

I think it's something I have mentioned previously at a community meeting. We already have a way of creating comments through said app, it would be nice to expand on that capability

Eijebong added a commit to Eijebong/mozilla-taskgraph that referenced this pull request Apr 14, 2025
Since we're using the uv hook, pre-commit requires the internet to work
properly which the pre-commit.ci app ran jobs don't have access to.
These two workflows are meant to replace the app entirely by doing both
checking on PRs/main and auto updates. It means that we do lose the
autofix feature, but it's that or throwing away the uv-lock hook.

Original work done in taskcluster/taskgraph#677
and taskcluster/taskgraph#678
Eijebong added a commit to Eijebong/mozilla-taskgraph that referenced this pull request Apr 16, 2025
Since we're using the uv hook, pre-commit requires the internet to work
properly which the pre-commit.ci app ran jobs don't have access to.
These two workflows are meant to replace the app entirely by doing both
checking on PRs/main and auto updates. It means that we do lose the
autofix feature, but it's that or throwing away the uv-lock hook.

Original work done in taskcluster/taskgraph#677
and taskcluster/taskgraph#678
@Eijebong Eijebong requested a review from ahal April 16, 2025 13:11
Eijebong added a commit to Eijebong/mozilla-taskgraph that referenced this pull request Apr 16, 2025
Since we're using the uv hook, pre-commit requires the internet to work
properly which the pre-commit.ci app ran jobs don't have access to.
These two workflows are meant to replace the app entirely by doing both
checking on PRs/main and auto updates. It means that we do lose the
autofix feature, but it's that or throwing away the uv-lock hook.

Original work done in taskcluster/taskgraph#677
and taskcluster/taskgraph#678

Also ran uv sync to make pre-commit happy
@Eijebong Eijebong merged commit 88adbc5 into taskcluster:main Apr 16, 2025
14 checks passed
ahal pushed a commit to mozilla-releng/mozilla-taskgraph that referenced this pull request Apr 21, 2025
Since we're using the uv hook, pre-commit requires the internet to work
properly which the pre-commit.ci app ran jobs don't have access to.
These two workflows are meant to replace the app entirely by doing both
checking on PRs/main and auto updates. It means that we do lose the
autofix feature, but it's that or throwing away the uv-lock hook.

Original work done in taskcluster/taskgraph#677
and taskcluster/taskgraph#678

Also ran uv sync to make pre-commit happy
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