Ok, that's not entirely true. You can still set your org location to your country. But it used to be an open textbox where you could input anything. What was even the point of this change, GitHub?
So I recently started a new GitHub org for a platform I'm building out. While filling in the basic details and adding a location, I noticed that putting "United States of America" as the choice seemed a bit odd.
Wait... Wasn't this a free textbox input before? Oh, they probably just added this nice dropdown list of cuntries as an autocomplete feature, I'll just click enter to put "San Francisco" instead.
(clicks enter)
...
(clicks enter again)
...
What the heck GitHub. What was the point of this change. Putting an open textbox for location was fun. Remember my old Genshin Impact site with its location as the fictional location of Teyvat?
Wait a second, did they remove that location with this change?
(checks impact.moe site)
They didn't! I bet you can still freely update it with the API!
So I went ahead and made an org update request, and what do you know, it worked!
Here's the Postman collection to freely update your org location: Postman Collection
{
"info": {
"_postman_id": "65dfc946-726b-4a05-9a0c-03688396c1fa",
"name": "GitHub Org Update",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "11762359"
},
"item": [
{
"name": "GitHub Org Update",
"request": {
"method": "PATCH",
"header": [
{
"key": "Accept",
"value": "application/vnd.github+json"
},
{
"key": "Authorization",
"value": ""
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"location\": \"San Francisco\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://api.github.com/orgs/xenith-ai",
"protocol": "https",
"host": ["api", "github", "com"],
"path": ["orgs", "xenith-ai"]
}
},
"response": []
}
]
}
The GitHub documentation specifies this as a Patch operation. In any case, you'll need to add your own access token generated under the Authorization header.
To get a new access token, just go to your GitHub Account Settings and at the bottom of the left sidebar is "Developer Settings".
Go there and click Generate new token and generate a classic token. Just give it admin:org permissions, and you can copy and paste it into the Postman collection auth header field.
Top comments (0)