Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
user-check

GitHub Action

Is Organization Member

1.0.0

Is Organization Member

user-check

Is Organization Member

Checks if someone is a member of an organization

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Is Organization Member

uses: JamesSingleton/[email protected]

Learn more about this action in JamesSingleton/is-organization-member

Choose a version

Is Organization Member

This action returns if someone belongs to a certain organization or not.

Usage

An example workflow using the action:

name: Is Organization Member Example

on:
  issues:
    types: [opened, labeled]

jobs:
  welcome:
    name: Welcome
    runs-on: ubuntu-latest
    steps:
      - name: Check if organization member
        id: is_organization_member
        if: github.event.action == 'opened'
        uses: jamessingleton/is-organization-member@v1
        with:
          organization: testorg
          username: ${{ github.event.issue.user.login }}
          token: ${{ secrets.GITHUB_TOKEN }}
      - name: Create Comment
        if: |
          steps.is_organization_member.outputs.result == false
        run: echo User Does Not Belong to testorg