-
Notifications
You must be signed in to change notification settings - Fork 3
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
Figure out why major
label was added to dependabot created PR
#175
Comments
This happened because, whenever Dependabot creates a PR for a major version update (e.g., v3 to v4), if the repository the PR is created in has a "major" label defined, the label will be applied to the PR regardless of what's in I recommend addressing this by reconfiguring auto to use labels that aren't named "major", "minor", and "patch"; for an example configuration, see auto's last used configuration in datalad/datalad. Once (An alternative approach would be to create a GitHub Actions workflow that automatically relabels Dependabot PRs, but that seems too much like a bandaid.) auto will also have to be reconfigured on all other repositories that use both auto and Dependabot; the following script will list them: #!/usr/bin/env python3
# /// script
# requires-python = ">=3.8"
# dependencies = ["ghreq ~= 0.1", "ghtoken ~= 0.1"]
# ///
from __future__ import annotations
from collections.abc import Iterator
import ghreq
from ghtoken import get_ghtoken
OWNERS = ["con", "dandi", "datalad"]
class Client(ghreq.Client):
def get_repos_for_owner(self, owner: str) -> Iterator[dict]:
return self.paginate(f"/users/{owner}/repos")
def has_file(self, repo_url: str, path: str) -> bool:
try:
self.request("HEAD", f"{repo_url}/contents/{path}", raw=True)
except ghreq.PrettyHTTPError as e:
if e.response.status_code == 404:
return False
else:
raise e
else:
return True
with Client(token=get_ghtoken()) as client:
for owner in OWNERS:
for r in client.get_repos_for_owner(owner):
if r["archived"] or r["fork"]:
continue
if client.has_file(r["url"], ".autorc") and client.has_file(
r["url"], ".github/dependabot.yml"
):
print(r["full_name"]) You may also want to create an issue in auto's repository about this; there doesn't seem to be one there already. |
I just realized there's another category of our repositories that use both "major" labels and Dependabot: those that use datalad/release-action with labels named "major" etc. The only such repository seems to be https://github.com/datalad/datalad-container. (datalad/release-action itself also uses "major" labels, but it doesn't use Dependabot.) |
ideally it should be IMHO addressed on dependabot, but given that that issue is from
would you be kind to do so? |
@yarikoptic Issue created: intuit/auto#2412 |
#164 had
internal
andmajor
labels, which I have missed and thus merging/releasing resulted in1.0.0
release of datalad-installer. Not a biggie, I think we are fine with 1.0.0 release (finally), but it is not clear why "major" was added since https://github.com/datalad/datalad-installer/blob/master/.github/dependabot.yml#L10 has onlyinternal
.The text was updated successfully, but these errors were encountered: