Check out this Github Action that invites a user to Snyk. The action is triggered whenever a GitHub issue matching a title and body is created (e.g. onboarding ticket)
Snyk invite user issue action
A GitHub action to invite a user to Snyk. The action is triggered whenever a GitHub issue matching a title and body is created (e.g. onboarding ticket)
Requirements
A GitHub secret named SNYK_TOKEN
must be created on the repo and contain a valid Snyk API token with enough privilege to invite users to the Snyk org.
Usage
on
issues
types: [opened, reopened]
jobs
snyk_invite_job:
runs-on: ubuntu-latest
name: A job to invite a Snyk user
steps:
- name: invite action step
id: invite
uses: pierre-ernst/Snyk-invite-user-issue-action@v0.1.0
with:
snyk-org-id: "4a18d42f-0706-4ad0-b127-24078731fbed"
regex-title: "Issue Trigger - .+"
regex-email: "- Email:\\s*([^\\s]+)\\s*"
regex-checkbox: "- \\[ \\] The checkbox"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
…- Link to Github Marketplace
Discussion (0)