Open
Description
I'm trying the suborg feature with our GitHub Enterprise Server 3.7.
I use the following yml. file (stored under .github/suborgs/backend.yml):
suborgrepos:
- backend-app
- laravel-app
suborgteams:
- backend
In the logfiles of the container I can find a message "...is not supported in your GitHub Enterprise Server version. Please replace with ..."
Details:
{"level":20,"time":1676277773509,"pid":37,"hostname":"safe-settings-75c5cf5867-czr2v","name":"probot","name":"probot","name":"octokit","msg":"GitHub request: GET https://github.mycompany.com/api/v3/orgs/Dev-Ops/teams/backend/repos?per_page=100 - 404"}
{"level":50,"time":1676277773509,"pid":37,"hostname":"safe-settings-75c5cf5867-czr2v","name":"probot","name":"probot","name":"event","id":"67832ee0-ab7a-11ed-8ae4-3e33caef2d56","name":"HttpError","status":404,"request":{"method":"GET","baseUrl":"https://github.mycompany.com/api/v3","headers":{"accept":"application/vnd.github.v3+json","user-agent":"probot/12.3.0 octokit-core.js/3.6.0 Node.js/14.17.6 (linux; x64)"},"mediaType":{"format":"","previews":[]},"request":{"retryCount":1},"url":"https://github.mycompany.com/api/v3/orgs/Dev-Ops/teams/backend/repos?per_page=100"},"event":{"id":"67832ee0-ab7a-11ed-8ae4-3e33caef2d56","name":"push","payload": ... ,"stack":"HttpError: \"GET https://github.mycompany.com/api/v3/orgs/Dev-Ops/teams/backend/repos?per_page=100\" is not supported in your GitHub Enterprise Server version. Please replace with octokit.request(\"GET https://github.mycompany.com/api/v3/teams/{team_id}/repos?per_page=100\", { team_id })\n at /opt/safe-settings/node_modules/@octokit/plugin-enterprise-compatibility/dist-node/index.js:26:15\n at async Object.next (/opt/safe-settings/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js:112:28)\n at async Promise.all (index 0)\n at async Settings.getSubOrgConfigs (/opt/safe-settings/lib/settings.js:600:11)\n at async Settings.loadConfigs (/opt/safe-settings/lib/settings.js:186:26)\n at async Function.syncSubOrgs (/opt/safe-settings/lib/settings.js:20:5)\n at async Promise.all (index 0)\n at async Promise.all (index 0)\n at async middleware (/opt/safe-settings/node_modules/@octokit/webhooks/dist-node/index.js:355:5)","type":"Error","msg":"\"GET https://github.mycompany.com/api/v3/orgs/Dev-Ops/teams/backend/repos?per_page=100\" is not supported in your GitHub Enterprise Server version. Please replace with octokit.request(\"GET https://github.mycompany.com/api/v3/teams/{team_id}/repos?per_page=100\", { team_id })"}
{"level":30,"time":1676277773510,"pid":37,"hostname":"safe-settings-75c5cf5867-czr2v","name":"probot","name":"server","name":"http","req":{"id":"16f0662a7faa8b18f7ff851f6e9cea99","method":"POST","url":"/","query":{},"params":{},"headers":{"host":"safe-settings-devops.mycompany.com","x-request-id":"16f0662a7faa8b18f7ff851f6e9cea99","x-real-ip":"172.29.6.152","x-forwarded-for":"172.29.6.152","x-forwarded-host":"safe-settings-devops.mycompany.com","x-forwarded-port":"443","x-forwarded-proto":"https","x-forwarded-scheme":"https","x-scheme":"https","content-length":"9549","user-agent":"GitHub-Hookshot/df8611c","accept":"*/*","x-github-delivery":"67832ee0-ab7a-11ed-8ae4-3e33caef2d56","x-github-enterprise-host":"github.mycompany.com","x-github-enterprise-version":"3.7.4","x-github-event":"push","x-github-hook-id":"6","x-github-hook-installation-target-id":"5","x-github-hook-installation-target-type":"integration","x-hub-signature":"sha1=f0397d243a9110cb689243dcf9a20179ec72741f","x-hub-signature-256":"sha256=20c5b69be20595f5e29be470399bf75bdadb248aff52eeefd6fee6d81e115439","content-type":"application/json"},"remoteAddress":"::ffff:172.29.6.62","remotePort":58218},"res":{"statusCode":404,"headers":{"x-powered-by":"Express"}},"responseTime":421,"msg":"POST / 404 - 421ms"}
{"level":30,"time":1676277841549,"pid":37,"hostname":"safe-settings-75c5cf5867-czr2v","name":"probot","name":"server","name":"http","req":{"id":"f275fb35-cd55-46db-95dc-8ef58768c6aa","method":"GET","url":"/","query":{},"params":{},"headers":{"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46","accept-encoding":"gzip, deflate, gzip, deflate","accept":"*/*","connection":"keep-alive","x-requested-with":"XMLHttpRequest","content-type":"application/x-www-form-urlencoded; charset=UTF-8","accept-language":"en US,en;q=0.9,sv;q=0.8","host":"20.31.208.77"},"remoteAddress":"::ffff:172.29.6.123","remotePort":45868},"res":{"statusCode":302,"headers":{"x-powered-by":"Express","location":"/probot","vary":"Accept","content-type":"text/plain; charset=utf-8","content-length":"29"}},"responseTime":2,"msg":"GET / 302 - 2ms"}
Should suborgs work on Enterprise Server?
Tested with container images
- yadhav/safe-settings:2.0.21-rc.5
- yadhav/safe-settings:2.0.18