Skip to content

Please invite me to the GitHub Community Organization #3

Please invite me to the GitHub Community Organization

Please invite me to the GitHub Community Organization #3

Workflow file for this run

name: Send Organization Invite
on:
issues:
types: [opened]
jobs:
send-invite:
runs-on: ubuntu-latest
steps:
- name: Send Organization Invite
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { Octokit } = require('@octokit/rest');
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
const orgName = 'YOUR_ORGANIZATION_NAME';
const username = context.payload.issue.user.login;
octokit.orgs.createInvitation({
org: orgName,
invitee_id: username
});