Skip to content

Commit

Permalink
fixup! tools: add workflow to ensure README lists are in sync with …
Browse files Browse the repository at this point in the history
…gh teams

do not error out if secret is missing
  • Loading branch information
aduh95 committed Jul 17, 2024
1 parent 5370926 commit f8be2d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/linters-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ jobs:
get_list_members() {
TEAM="$1"
QUOTE='"'
gh api "/orgs/$GITHUB_REPOSITORY_OWNER/teams/$TEAM/members" -X GET -f per_page=100 --jq "map(.login) | ${QUOTE}${TEAM}=\(tojson)${QUOTE}"
gh api "/orgs/nodejs/teams/$TEAM/members" -X GET -f per_page=100 --jq "map(.login) | ${QUOTE}${TEAM}=\(tojson)${QUOTE}"
}
get_list_members "collaborators" >> "$GITHUB_OUTPUT"
get_list_members "issue-triage" >> "$GITHUB_OUTPUT"
get_list_members "tsc" >> "$GITHUB_OUTPUT"
[ -z "$GITHUB_TOKEN" ] || (
get_list_members "collaborators"
get_list_members "issue-triage"
get_list_members "tsc"
) >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
- name: Get modified README
Expand Down
2 changes: 1 addition & 1 deletion tools/lint-readme-lists.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ console.info('Lists are in the alphabetical order.');

assert.deepStrictEqual(tscMembers, new Set(), 'Some TSC members are not listed as Collaborators');

if (argv[2]) {
if (argv[2] && argv[2] !== '{}') {
const reviver = (_, value) =>
(typeof value === 'string' && value[0] === '[' && value.at(-1) === ']' ?
new Set(JSON.parse(value)) :
Expand Down

0 comments on commit f8be2d4

Please sign in to comment.