Skip to content
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

[Feature Request] Skip archived repositories from being configured #443

Open
martinm82 opened this issue Mar 30, 2023 · 6 comments · May be fixed by #692
Open

[Feature Request] Skip archived repositories from being configured #443

martinm82 opened this issue Mar 30, 2023 · 6 comments · May be fixed by #692
Labels
enhancement New feature or request

Comments

@martinm82
Copy link
Contributor

New Feature

When configuring (e.g., topics, vulnerability, general settings, etc. ) archived repositories, safe-settings receives HTTP 422 errors. Since the intention of archived repositories is to not use them anymore there is no reason to configure them.

Therefore my proposal is to exclude those in safe-settings. This will have a positive impact on the rate limit.

@martinm82 martinm82 added the enhancement New feature or request label Mar 30, 2023
@martinm82
Copy link
Contributor Author

Seems that there is already a WIP PR that tackles this issue: #193

@joshbranham
Copy link

We are seeing this, although it is coming through as 403.

@roryscarson
Copy link

#193 is different than just ignoring archived repos.

Example error log from trying to apply changes to archived repos. I agree that ignoring archived repos will positively effect the rate limit, while also removing noise from the logs. We needed to filter out "Repository was archived so is read-only" from our alerting.

Error applying branch protection {"name":"HttpError","status":403,"response":{"url":"https://api.github.com/repos/ORG_NAME/REPO-NAME/branches/master/protection","status":403,"headers":{"access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset","content-encoding":"gzip","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Mon, 08 Apr 2024 16:10:55 GMT","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"GitHub.com","strict-transport-security":"max-age=31536000; includeSubdomains; preload","transfer-encoding":"chunked","vary":"Accept-Encoding, Accept, X-Requested-With","x-accepted-github-permissions":"administration=write","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-api-version-selected":"2022-11-28","x-github-media-type":"github.v3; param=hellcat-preview.luke-cage-preview.zzzax-preview; format=json","x-github-request-id":"7472:1D027F:1055E0D:1A32158:6614170E","x-ratelimit-limit":"15000","x-ratelimit-remaining":"14917","x-ratelimit-reset":"1712593030","x-ratelimit-resource":"core","x-ratelimit-used":"83","x-xss-protection":"0"},"data":{"message":"Repository was archived so is read-only.","documentation_url":"https://docs.github.com/rest/branches/branch-protection#update-branch-protection"}},"request":{"method":"PUT","url":"https://api.github.com/repos/ORG_NAME/REPO-NAME/branches/master/protection","headers":{"accept":"application/vnd.github.hellcat-preview+json,application/vnd.github.luke-cage-preview+json,application/vnd.github.zzzax-preview+json","user-agent":"probot/12.3.3 octokit-core.js/3.6.0 Node.js/21","authorization":"token [REDACTED]","content-type":"application/json; charset=utf-8"},"body":"{\"required_pull_request_reviews\":{\"required_approving_review_count\":1,\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"require_last_push_approval\":true,\"dismissal_restrictions\":{}},\"required_status_checks\":{\"strict\":true,\"contexts\":[]},\"enforce_admins\":false,\"restrictions\":null}","request":{"retryCount":1}}}

@ElioDiNino
Copy link
Contributor

Yeah, we are getting a bunch of 403s from trying to incorrectly update archived repos. A fix for this would help a lot with rate-limiting and the volume of logs

@tegataiprime
Copy link

tegataiprime commented Aug 27, 2024

Up-vote for configuration options to exclude archived repos from being matching by settings.yml or a suborg definition (Rate-Limits, Logging, Performance).

@randomcascade randomcascade linked a pull request Sep 25, 2024 that will close this issue
@paddyroddy
Copy link

I've very keen for this. Particularly when using the GHA because it causes the workflow to fail unless manually adding to exclude:.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants