-
Notifications
You must be signed in to change notification settings - Fork 224
I'm attempting to use safe-settings in a new org and I can get it running and syncing existing repositories but I have been unable to get any new repositories to be created. I'm aiming for a solution where collaborators can create a PR for a new repo and have this created for them - rather than creating the repo then having safe-settings find it take control over it.
Any ideas as to what could be going wrong/something I am missing?
Using version 2.1.10 but I have also tried downgrading a few versions back and using head of main-enterprise.
My .github/settings.yml:
repository:
auto_init: true
private: true
visibility: private
default_branch: main
has_issues: false
has_projects: false
has_discussions: false
has_wiki: false
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: false
allow_update_branch: false
delete_branch_on_merge: true
A repo .github/repos/auto-test-1.yml (also another with the same config as you'll see in the logs):
repository:
name: auto-test-1
description: Example of a test repository manage by safe-settings
force_create: true
topics:
- safe-settings
I can see the repo config being picked up in the logs but nothing being done with it:
EBUG (probot): running a task every minute
TRACE (probot): Fetching installations
DEBUG (octokit): GitHub request: GET https://api.github.com/app/installations?per_page=100 - 200
DEBUG (probot): deploymentConfig is {"restrictedRepos":["admin",".github","safe-settings"]}
DEBUG (github): GitHub request: GET https://api.github.com/repos/trifikam/admin/contents/.github%2Fsettings.yml - 200
DEBUG (probot): config for ref undefined is {"restrictedRepos":["admin",".github","safe-settings"],"repository":{"auto_init":true,"private":true,"visibility":"private","default_branch":"main","has_issues":false,"has_projects":false,"has_discussions":false,"has_wiki":false,"allow_squash_merge":true,"allow_merge_commit":false,"allow_rebase_merge":false,"allow_update_branch":false,"delete_branch_on_merge":true}}
DEBUG (probot): In getSubOrgConfigMap {"repo":"admin","owner":"trifikam"}
DEBUG (probot): In loadConfigMap {"owner":"trifikam","repo":"admin","path":".github/suborgs"}
DEBUG (github): GitHub request: GET https://api.github.com/repos/trifikam/admin/contents/.github%2Fsuborgs - 404
DEBUG (probot): Error getting settings {"owner":"trifikam","repo":"admin","path":".github/suborgs"} HttpError: Not Found
DEBUG (probot): In getRepoConfigMap {"repo":"admin","owner":"trifikam"}
DEBUG (github): GitHub request: GET https://api.github.com/repos/trifikam/admin/contents/.github - 200
DEBUG (probot): repos directory info {"name":"repos","path":".github/repos","sha":"6874987eef80d4e4897552dff18a09b11b0dbe96","size":0,"url":"https://api.github.com/repos/trifikam/admin/contents/.github/repos?ref=main","html_url":"https://github.com/trifikam/admin/tree/main/.github/repos","git_url":"https://api.github.com/repos/trifikam/admin/git/trees/6874987eef80d4e4897552dff18a09b11b0dbe96","download_url":null,"type":"dir","_links":{"self":"https://api.github.com/repos/trifikam/admin/contents/.github/repos?ref=main","git":"https://api.github.com/repos/trifikam/admin/git/trees/6874987eef80d4e4897552dff18a09b11b0dbe96","html":"https://github.com/trifikam/admin/tree/main/.github/repos"}}
DEBUG (github): GitHub request: GET https://api.github.com/repos/trifikam/admin/git/trees/6874987eef80d4e4897552dff18a09b11b0dbe96?path=.github&recursive=0 - 200
DEBUG (probot): Total overrides found in getRepoConfigMap are 2
DEBUG (github): GitHub request: GET https://api.github.com/repos/trifikam/admin/contents/.github%2Frepos%2Fauto-test-1.yml - 200
DEBUG (probot): data = {"repository":{"name":"auto-test-1","description":"Example of a test repository manage by safe-settings","force_create":true,"topics":["safe-settings"]}}
DEBUG (github): GitHub request: GET https://api.github.com/repos/trifikam/admin/contents/.github%2Frepos%2Fauto-test-2.yml - 200
DEBUG (probot): data = {"repository":{"name":"auto-test-2","description":"Example of a test repository manage by safe-settings","force_create":true,"topics":["safe-settings"]}}
DEBUG (probot): repo configs = {"auto-test-1.yml":{"repository":{"name":"auto-test-1","description":"Example of a test repository manage by safe-settings","force_create":true,"topics":["safe-settings"]}},"auto-test-2.yml":{"repository":{"name":"auto-test-2","description":"Example of a test repository manage by safe-settings","force_create":true,"topics":["safe-settings"]}}}
DEBUG (probot): Fetching repositories
DEBUG (github): GitHub request: GET https://api.github.com/installation/repositories - 200
DEBUG (probot): Skipping retricted repo admin
DEBUG (probot): Not run in nop
DEBUG (github): GitHub request: GET https://api.github.com/repos/trifikam/admin/commits - 200
DEBUG (Safe-Settings): GitHub request: POST https://api.github.com/repos/trifikam/admin/check-runs - 201
head_sha: "9f763affc560e9c9de7a9c450d095e7ec7f0b908"
status: "completed"
started_at: "2024-06-14T14:05:03.117Z"
conclusion: "success"
completed_at: "2024-06-14T14:05:03.429Z"
output: {
"title": "Safe-Settings",
"summary": "Safe-Settings finished successfully.",
"text": "Run on: `2024年06月14日T14:05:03.117Z`"
}
DEBUG (probot): Created the check for Safe-Settings {"status":201,"url":"https://api.github.com/repos/trifikam/admin/check-runs","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","cache-control":"private, max-age=60, s-maxage=60","connection":"close","content-length":"2444","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Fri, 14 Jun 2024 14:05:03 GMT","etag":"\"4e01faeee29176aa824e60890452ec96460878d1ae288475055a1c7e129d9118\"","location":"https://api.github.com/repos/trifikam/admin/check-runs/26236044337","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"GitHub.com","strict-transport-security":"max-age=31536000; includeSubdomains; preload","vary":"Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With","x-accepted-github-permissions":"checks=write","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-api-version-selected":"2022-11-28","x-github-media-type":"github.v3; format=json","x-github-request-id":"EA00:1CA5F6:2B69849:2D4EDF5:666C4E0F","x-ratelimit-limit":"5000","x-ratelimit-remaining":"4982","x-ratelimit-reset":"1718377202","x-ratelimit-resource":"core","x-ratelimit-used":"18","x-xss-protection":"0"},"data":{"id":26236044337,"name":"Safe-Settings","node_id":"CR_kwDOMJSjPc8AAAAGG8pEMQ","head_sha":"9f763affc560e9c9de7a9c450d095e7ec7f0b908","external_id":"","url":"https://api.github.com/repos/trifikam/admin/check-runs/26236044337","html_url":"https://github.com/trifikam/admin/runs/26236044337","details_url":"https://github.com/github/safe-settings","status":"completed","conclusion":"success","started_at":"2024-06-14T14:05:03Z","completed_at":"2024-06-14T14:05:03Z","output":{"title":"Safe-Settings","summary":"Safe-Settings finished successfully.","text":"Run on: `2024年06月14日T14:05:03.117Z`","annotations_count":0,"annotations_url":"https://api.github.com/repos/trifikam/admin/check-runs/26236044337/annotations"},"check_suite":{"id":24905428815},"app":{"id":920774,"slug":"km-safe-settings","node_id":"A_kwHOCknQ9s4ADgzG","owner":{"login":"trifikam","id":172609782,"node_id":"O_kgDOCknQ9g","avatar_url":"https://avatars.githubusercontent.com/u/172609782?v=4","gravatar_id":"","url":"https://api.github.com/users/trifikam","html_url":"https://github.com/trifikam","followers_url":"https://api.github.com/users/trifikam/followers","following_url":"https://api.github.com/users/trifikam/following{/other_user}","gists_url":"https://api.github.com/users/trifikam/gists{/gist_id}","starred_url":"https://api.github.com/users/trifikam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trifikam/subscriptions","organizations_url":"https://api.github.com/users/trifikam/orgs","repos_url":"https://api.github.com/users/trifikam/repos","events_url":"https://api.github.com/users/trifikam/events{/privacy}","received_events_url":"https://api.github.com/users/trifikam/received_events","type":"Organization","site_admin":false},"name":"km-safe-settings","description":"","external_url":"https://github.com/github/safe-settings","html_url":"https://github.com/apps/km-safe-settings","created_at":"2024-06-13T13:56:04Z","updated_at":"2024-06-13T13:56:05Z","permissions":{"administration":"write","checks":"write","contents":"write","issues":"write","members":"write","metadata":"read","organization_administration":"write","organization_custom_properties":"admin","pull_requests":"write","repository_custom_properties":"write","statuses":"write"},"events":["branch_protection_rule","check_run","check_suite","create","custom_property_values","member","pull_request","push","repository","repository_ruleset","team"]},"pull_requests":[]}}
The PR dry run didn't get the new repo either:
Screenshot 2024年06月14日 at 15 42 16
All reactions
Replies: 1 comment
Does not work for me as well