pre-commit-ci / issues

public issues for https://pre-commit.ci
17 stars 4 forks source link

(feat) rebase when target receives newer commits by pre-commit.ci autoupdate #41

Closed sbrugman closed 3 years ago

sbrugman commented 3 years ago

Hi @asottile, heavy user of pre-commit and more recently watching your twitch stream. Thanks for creating and sharing them!

For pandas-profiling we are running both pre-commit.ci and dependabot. pre-commit.ci currently has no mechanism to rebase once the pull-request target received additional commits after the autoupdate PR was generated. This now needs to be done manually. dependabot achieves this by being triggered by a github commont @dependabot rebase.

Enhancing pre-commit.ci will increase it's usefullness by requiring less manual steps. Of course alternatives to triggering by github comments can also resolve this issue (scheduled interval, trigger by updates on the target branch etc.).

Examples pre-commit.ci autoupdate and dependabot:

asottile commented 3 years ago

Could you provide an example output of what you'd expect to see? the update PRs aren't meant to be long living and if they happen to live longer than a week they'll be rebased automatically

pre-commit.ci doesn't really know anything about your autoupdate PR after creation -- they're treated identically to normal PRs after that

sbrugman commented 3 years ago

Simply providing that information (automatically rebase after a week) inside the PR description might already be enough. Even more user friendly would be to have a way to trigger te rebase (described in the pre-commit.ci PR description perhaps).

In this specific case the PR was created while the development branch CI was failing. Rebasing would trigger the CI tests for the pre-commit.ci tests to be green.

asottile commented 3 years ago

I think it's a bit feature creep to implement a generic rebasing command into pre-commit.ci -- seems like something better fitted for another tool to implement -- what do you think?

sbrugman commented 3 years ago

I agree that rebasing would be overkill, unless it's triggered in the same way as pre-commit runs (re-running a pull request: you can trigger a re-run on a pull request by closing and re-opening.).

Perhaps the PR created by pre-commit-ci could simply have the same description as the docs, or a link to it.

re-commit.ci will periodically autoupdate your configuration ensuring that your hook versions are kept up to date. this autoupdate is currently scheduled weekly at approximately 18:00 UTC Monday. This PR will be rebased in case newer commits have been added to the target branch by then.

Read more on the website


Current: image


Suggested: image

asottile commented 3 years ago

I'd rather not duplicate the docs in a place I can't control after creation (and dillute the google search results)

asottile commented 3 years ago

oh, just realized -- this issue is not in the right project at all

asottile commented 3 years ago

but yeah, I'd suggest using something like this: https://github.com/cirrus-actions/rebase -- no need for pre-commit.ci to reinvent the wheel here