workflows: add dashboard team management file#1895
Conversation
| nuclearcat | ||
| victor-accarini | ||
| alanpeixinho | ||
| gustavobtflores |
There was a problem hiding this comment.
Also all commits should have a signed off tag. But I noticed you guys don't do that, is that something we can change going forward?
There was a problem hiding this comment.
For the workflow to work we need to set the ORG_ADMIN_TOKEN secret, or if we already have another valid secret I can update to use that instead
a235ce3 to
ddc8a0b
Compare
b0370b8 to
0728ff1
Compare
alanpeixinho
left a comment
There was a problem hiding this comment.
Tested on dry run only. But it is okay.
| const required = ["ORG", "TEAM_SLUG"]; | ||
|
|
||
| if (!DRY_RUN) { | ||
| required.push("GITHUB_TOKEN"); |
There was a problem hiding this comment.
even for a dry run, I believe we still need to provide the GITHUB_TOKEN, better to always check for it
There was a problem hiding this comment.
Yep, you are right, updated
There was a problem hiding this comment.
I also update the CODEOWNERS file to ensure we can't change the script behavior without one of the owners knowing @bhcopeland
There was a problem hiding this comment.
I also update the CODEOWNERS file to ensure we can't change the script behavior without one of the owners knowing @bhcopeland
Good point
| const invalidUsers = users.some((u) => !USER_RE.test(u)); | ||
| if (invalidUsers) { | ||
| throw new Error( | ||
| `Found an invalid GitHub username in array: [${users.join(", ")}]`, |
There was a problem hiding this comment.
As we are not providing the reason a username is invalid, we should at least filter to show here only the list of invalid usernames.
To add and remove members of the dashboard team we use a specific membership file, this way it's easier to onboarding and offboard new members. Github has a policy that only members of an organization can be part of a team, this change automates that invitation and team setup. Signed-off-by: Victor Accarini <victor.accarini@profusion.mobi>
0728ff1 to
8349361
Compare
gustavobtflores
left a comment
There was a problem hiding this comment.
I think we should also have a .gitignore for the /scripts node_modules
| - ".github/scripts/sync-dashboard-team.js" | ||
| - ".github/scripts/package.json" | ||
| - ".github/scripts/package-lock.json" | ||
| - ".github/workflows/sync-dashboard-team.yml" |
There was a problem hiding this comment.
I think the extension should be .yaml here
| - ".github/workflows/sync-dashboard-team.yml" | |
| - ".github/workflows/sync-dashboard-team.yaml" |
| - ".github/scripts/sync-dashboard-team.js" | ||
| - ".github/scripts/package.json" | ||
| - ".github/scripts/package-lock.json" | ||
| - ".github/workflows/sync-dashboard-team.yml" |
There was a problem hiding this comment.
ditto
| - ".github/workflows/sync-dashboard-team.yml" | |
| - ".github/workflows/sync-dashboard-team.yaml" |
To add and remove members of the dashboard team we use a specific membership file, this way it's easier to onboarding and offboard new members.
Github has a policy that only members of an organization can be part of a team, this change automates that invitation and team setup.