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

ApproveOps - Approvals in IssueOps

v1.0.3

ApproveOps - Approvals in IssueOps

user-check

ApproveOps - Approvals in IssueOps

IssueOps (ChatOps) workflows that require Approvals from someone in a designated GitHub team

Installation

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

              

- name: ApproveOps - Approvals in IssueOps

uses: joshjohanning/approveops@v1.0.3

Learn more about this action in joshjohanning/approveops

Choose a version

ApproveOps

Approvals in IssueOps

See the following guide on this action: https://josh-ops.com/posts/github-approveops/

Usage

- name: ApproveOps - ApproveOps in IssueOps
  uses: joshjohanning/approveops@v1
  id: check-approval
  with:
    app-id: 170284 # The GitHub App ID; ie: 170284
    app-private-key: ${{ secrets.PRIVATE_KEY }} # Private key for the GitHub App that is installed on the repo; e.g.: ${{ secrets.PRIVATE_KEY }}
    team-name: approver-team # The name of the team in GitHub to check for the approval command; e.g.: approver-team
    fail-if-approval-not-found: false # Fail the action (show the action run as red) if the command is not found in the comments from someone in the approver team"

Prerequisites

  1. Create a GitHub team and add at least one member
  2. You will need a Github App with the following permissions:
    • read-only on Organization / Members to list the members of the team
    • read & write on Repository / Issues to create the comment
  3. Generate a PRIVATE_KEY for the GitHub app and store it as a repo or organizational secret
  4. Capture the APP ID to use as an input for this action

See the following guide on creating a GitHub app: https://josh-ops.com/posts/github-apps/

Notes:

  • A Personal Access Token (PAT) is not used since we want the comment to show as from a bot
  • The github.token is not used since the token can't provide hyperlinks for @ mentions since it doesn't have the scope for org teams, only repository data

Screenshots

approveops

workflow