Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Latest commit

 

History

History
56 lines (43 loc) · 1.74 KB

File metadata and controls

56 lines (43 loc) · 1.74 KB

About

GitHub Action to check if the PR author is member of the GitHub organization.

Usage

Configuration

Given the CI GitHub action:

---
name: Is PR Author member Example
on:
  issues:
    types: [opened]
jobs:
  run-if-member:
    name: Welcome
    runs-on: ubuntu-latest
    steps:
      - id: is_pr_author_elastic_member
        uses: elastic/apm-pipeline-library/.github/actions/is-pr-author-member-elastic-org@current
        with:
          pull-request: ${{ github.event.issue.number }}
          repository: ${{ github.repository }}
          token: ${{ secrets.PAT_TOKEN }}
      - if: steps.is_pr_author_elastic_member.outputs.result == true
        run: echo 'PR author "${{ steps.is_pr_author_elastic_member.outputs.author }}" of ${{ github.event.issue.number }} is Elastic member'

Customizing

inputs

Following inputs can be used as step.with keys

Name Type Default Description
pull-request String The GitHub Pull Request
repository String The GitHub repository, format: ORG/REPO
token String The GitHub token

outputs

Name Type Description
result Boolean Whether the PR author is member.
author String The PR author.