{"id":15757010,"url":"https://github.com/garnertb/get-team-members","last_synced_at":"2025-04-30T18:49:31.280Z","repository":{"id":44328323,"uuid":"511594022","full_name":"garnertb/get-team-members","owner":"garnertb","description":"This action fetches the users of a GitHub team.","archived":false,"fork":false,"pushed_at":"2024-11-20T20:01:44.000Z","size":8,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T18:49:25.942Z","etag":null,"topics":["actions"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garnertb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-07T16:08:47.000Z","updated_at":"2024-11-20T19:54:56.000Z","dependencies_parsed_at":"2024-10-25T07:33:00.073Z","dependency_job_id":"cd1eb434-bac6-46cb-8958-91d4be6b1656","html_url":"https://github.com/garnertb/get-team-members","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Fget-team-members","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Fget-team-members/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Fget-team-members/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garnertb%2Fget-team-members/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garnertb","download_url":"https://codeload.github.com/garnertb/get-team-members/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251765617,"owners_count":21640212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions"],"created_at":"2024-10-04T09:03:43.239Z","updated_at":"2025-04-30T18:49:31.223Z","avatar_url":"https://github.com/garnertb.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# get-team-members\n\nThis action fetches the users of a GitHub team.\n\n## Usage\n\n```yaml\n- uses: garnertb/get-team-members@v1\n  with:\n    # Name of the organization that the team is a part of.\n    # (required)\n    org: ''\n\n    # Name of the team to get the members of.\n    # (required)\n    team_slug: ''\n\n    # The role to filter team members by.\n    # Must be one of: 'member', 'maintainer', 'all'.\n    # Default: 'all'\n    role: ''\n\n    # Personal access token (PAT) used to fetch team members. \n    # Note the PAT must be entitled to at least `read:org` scope.\n    # Default: ${{ github.token }}\n    token: ''\n```\n\n## Permissions\n\nThe GitHub [token][token docs] needs to have `read:org` permissions to read organizational team members.\n\n## Scenerios\n\n### Fetch handles for all members of a team\n\n```yaml\n- id: get-members\n  uses: garnertb/get-team-members@v1\n  with:\n    org: garnertb-io\n    team_slug: ops\n    token: ${{ secrets.GITHUB_TOKEN }}\n\n- run: \"echo ${{ steps.get-members.outputs.members }}\"\n  shell: bash\n```\n\n### Fetch handles for the maintainers of a team\n\n```yaml\n- id: get-members\n  uses: garnertb/get-team-members@v1\n  with:\n    org: garnertb-io\n    team_slug: ops\n    role: maintainer\n    token: ${{ secrets.GITHUB_TOKEN }}\n\n# print results\n- run: \"echo ${{ steps.get-members.outputs.members }}\"\n  shell: bash\n```\n\n### Access additional member properties\n\n[Raw member data](https://docs.github.com/en/rest/teams/members#list-team-members) is accessible via the `data` output and can be manipulated with `jq`.\n\n```yaml\n- id: get-members\n  uses: garnertb/get-team-members@v1\n  with:\n    org: garnertb-io\n    team_slug: ops\n    role: maintainer\n    token: ${{ secrets.GITHUB_TOKEN }}\n\n  - run: \"echo '${{ steps.get-members.outputs.data }}' | jq '.[] | {login: .login, id: .id}'\"\n    shell: bash\n```\n\nResults:\n\n```json\n{\n  \"login\": \"garnertb\",   \n  \"id\": 1234\n}\n```\n\n### Assign team members to issue\n\nUse this action to set assignees for a new issue with [issue-bot](https://github.com/imjohnbo/issue-bot).\n\n```yaml\n- id: get-members\n  uses: garnertb/get-team-members@v1\n  with:\n    org: garnertb-io\n    team_slug: ops\n    role: maintainer\n    token: ${{ secrets.GITHUB_TOKEN }}\n\n- name: Create new issue\n  uses: imjohnbo/issue-bot@v3\n  with:\n    assignees: ${{ steps.get-members.outputs.members }}\n    title: Hello, world\n    body: |-\n      :wave: Hi, {{#each assignees}}@{{this}}{{#unless @last}}, {{/unless}}{{/each}}!\n```\n\n[token docs]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarnertb%2Fget-team-members","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarnertb%2Fget-team-members","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarnertb%2Fget-team-members/lists"}