Skip to content

workflows: add dashboard team management file#1895

Open
victor-accarini wants to merge 1 commit into
kernelci:mainfrom
profusion:dashboard-team-management
Open

workflows: add dashboard team management file#1895
victor-accarini wants to merge 1 commit into
kernelci:mainfrom
profusion:dashboard-team-management

Conversation

@victor-accarini
Copy link
Copy Markdown

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.

Comment thread .github/dashboard-team
nuclearcat
victor-accarini
alanpeixinho
gustavobtflores
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add me too?

Copy link
Copy Markdown
Member

@bhcopeland bhcopeland May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@victor-accarini victor-accarini force-pushed the dashboard-team-management branch from a235ce3 to ddc8a0b Compare May 12, 2026 18:36
@gustavobtflores gustavobtflores added the CI/CD Most or all of the changes are about automated tests / Github's CI label May 12, 2026
@victor-accarini victor-accarini force-pushed the dashboard-team-management branch 5 times, most recently from b0370b8 to 0728ff1 Compare May 12, 2026 19:06
Copy link
Copy Markdown
Contributor

@alanpeixinho alanpeixinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on dry run only. But it is okay.

Comment thread .github/scripts/sync-dashboard-team.js Outdated
const required = ["ORG", "TEAM_SLUG"];

if (!DRY_RUN) {
required.push("GITHUB_TOKEN");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even for a dry run, I believe we still need to provide the GITHUB_TOKEN, better to always check for it

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, you are right, updated

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also update the CODEOWNERS file to ensure we can't change the script behavior without one of the owners knowing @bhcopeland

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also update the CODEOWNERS file to ensure we can't change the script behavior without one of the owners knowing @bhcopeland

Good point

Comment thread .github/scripts/sync-dashboard-team.js Outdated
const invalidUsers = users.some((u) => !USER_RE.test(u));
if (invalidUsers) {
throw new Error(
`Found an invalid GitHub username in array: [${users.join(", ")}]`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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>
@victor-accarini victor-accarini force-pushed the dashboard-team-management branch from 0728ff1 to 8349361 Compare May 12, 2026 20:18
Copy link
Copy Markdown
Contributor

@gustavobtflores gustavobtflores left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the extension should be .yaml here

Suggested change
- ".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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Suggested change
- ".github/workflows/sync-dashboard-team.yml"
- ".github/workflows/sync-dashboard-team.yaml"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Most or all of the changes are about automated tests / Github's CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants