Closed jpmcb closed 6 days ago
The command works good for me. How does this handle attribution groups vs usernames? If I have an open-sauced/engineering
group of emails?
How does this handle attribution groups vs usernames?
It doesn't. It just uses a regex to look for the @
handle in CODEOWNERS
files, grabs those, and uses them in the payload to the API.
The v2/workspaces/:id/userLists/:list-id
API endpoint throws out logins that are invalid or 404 from GitHub.
For example, this request to the API:
curl -X 'PATCH' \
'https://api.opensauced.pizza/v2/workspaces/8718805b-66b8-4da5-887d-c37366b8e0da/userLists/157b6ce1-c50d-438a-8648-050fbf662854' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <redacted>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Test test test",
"is_public": false,
"contributors": [
{
"login": "jpmcb"
},
{
"login": "open-sauced/engineering"
},
{
"login": "Brandon Roberts"
}
]
}'
throws out the two logins that aren't actually logins.
Abit of a rough experience. In the future we could hit the v2/users
endpoints to see if the list of users is valid or not and inform the users of the ones that are being ignored. But this works for MVP right now.
Description
Refactors the existing interactive flow from
pizza generate codeowners
(after the codeowners file has been created) into its own command:Related Tickets & Documents
Closes #176
Steps to QA
just build
./build/pizza generate insight .
in a directory with aCODEOWNERS
fileTier (staff will fill in)