-
Notifications
You must be signed in to change notification settings - Fork 88
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
run pre-commit on PRs and have auto updates #311
Comments
I think I did get an email, but that's because I set up notifications in my GitHub profile just recently. It was pretty complicated - I could not replicate the process other than to say that I googled to learn how to set those options. Are you wanting to get something automated to reformat your source code when you push a commit to GitHub? (If so, that is what I want as well and I don't know exactly how to do it, but I know we used to do it using Subversion so I think |
The answer is Yes, and it can be done via running There are two ways to set up some formatting on github with pre-commit. One of the ways is to do it manually, which I ended up doing in PR #312. And so we can cancel the online request since it is no longer needed. What pre-commit does:
1-3) Already are True for Pydap. PR #312 allows for 4). |
Closed by #312 |
Description
I would like to set up pre-commit to run on GH as an action. It would run on every PR, and it should periodically trigger PR updating the hooks.
There are two ways to do this,
.github/workflows
. You can see this repo for more details: pre-commit/action. This action is in maintanance mode, but it is pretty direct.In both scenarios, a
.pre-commit-config.yaml
file is needed in the main directory of pydap with the appropriate configuration (hooks, id, etc etc). You can read more about the hooks pre-commit runs in the documentation here.What I did
I have already included the
.pre-commit-config.yaml
with the appropriate configuration on Pydap.However, I tried option 2) above, to add pydap onto as an installation on pre-commit ci. It looks like the request needs to be approved and after a couple of days (or more) it states that it is pending. You can see from the screenshot below:
I never got an email about this. Did you @jgallagher59701 ?
It may be that the easier way to move forwards with this is to manually create a github action worflow, as detailed in option 1). It requires minimal changes and should work right away.
The text was updated successfully, but these errors were encountered: