Skip to content

GuillaumeFalourd/github-team-members

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Team Members

Security Pipeline Super Linter Gitleaks

☞ GitHub Actions to get a GitHub Team Members list :octocat:

Observation: This action can also be used to check if the workflow ${{ github.actor }} belongs to the specified team.

📚 Usage

⚠️ Requirements

This action needs a GitHub Token or Personal Access Token with the read:org permission to read organizational team members.

Fetch all members from Team Slug

- id: get-members
  uses: GuillaumeFalourd/github-team-members@v1
  with:
    org_slug: org-slug
    team_slug: team-slug
    token: ${{ secrets.GITHUB_TOKEN }}

- run: "echo ${{ steps.get-members.outputs.members }}"
  shell: bash

Fetch maintainers from Team Slug

- id: get-members
  uses: GuillaumeFalourd/github-team-members@v1
  with:
    org_slug: org-slug
    team_slug: team-slug
    role: maintainer
    token: ${{ secrets.GITHUB_TOKEN }}

- run: "echo ${{ steps.get-members.outputs.members }}"
  shell: bash

Check if github.actor belongs to Team Slug

- id: get-members
  uses: GuillaumeFalourd/github-team-members@v1
  with:
    org_slug: org-slug
    team_slug: team-slug
    token: ${{ secrets.GITHUB_TOKEN }}

- if: steps.get-members.outputs.actor-belongs-team == 'true'
  run: echo "${{ github.actor }} belongs to Team"
  shell: bash
  
- if: steps.get-members.outputs.actor-belongs-team == 'false'
  run: echo "${{ github.actor }} doesn't belong to Team"
  shell: bash

▶️ Action Inputs

Field Mandatory Default Value Observation
org_slug YES - Organization's name
e.g: my-org
team_slug YES - Team's Slug
e.g: my-team
role NO all Members Role
e.g: member, maintainer or all
token NO ${{ github.token }} Personal Access Token to read org team.

▶️ Action Outputs

Field Observation
data Raw member data from GitHub API
members Team members list
actor-belongs-team If the workflow ${{ github.actor }} belongs to the team.
e.g: true or false

🤝 Contributing

☞ If you're interested in contributing to this repository, please follow the guidelines

🏅 Licensed

☞ This repository uses the Apache License 2.0

About

Github Actions to get / check Github Team Members :octocat:

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published