Skip to content

Please invite me to the GitHub Community Organization #37

Please invite me to the GitHub Community Organization

Please invite me to the GitHub Community Organization #37

Workflow file for this run

name: Send Organization Invite
on:
issues:
types: [labeled]
permissions: write-all
jobs:
Dump_Github_Context:
runs-on: ubuntu-latest
steps:
- name: Dump Github context
run: echo '${{ toJSON(github.event) }}' | jq
shell: bash
Invite_to_Organization:
runs-on: ubuntu-latest
needs: Dump_Github_Context
steps:
- name: Invite on label
uses: vj-abigo/[email protected]
with:
organization: Voninc
label: Please invite me to the GitHub Community Organization
repo-token: ${{ secrets.GITHUB_TOKEN }}
comment: '<h1>Hey there👋</h1> <br> You have been invited to <a href="https://github.com/Voninc"> Community</a>! 🚀 You can either accept it by going to <a href="https://github.com/Voninc">the organisation page</a> or checking <a href="https://github.com/settings/emails">your primary github email inbox</a>. We request you to kindly make the organization visible on your profile, by changing the visibility settings for your name on <a>https://github.com/orgs/Voninc/people</a>.'
env:
INVITE_TOKEN: ${{ secrets.TOKEN }}
Comment_on_Issue:
runs-on: ubuntu-latest
needs: Invite_to_Organization
steps:
- name: Add Comment
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.issue.number }}
body: |
Thank you for your interest in becoming a member in voninc :sparkles:
An invitation has been sent to your account! Please check your [organization page][1]
Don't forget to make the Community public on your profile, so it appears on your GitHub profile for everyone else to see. You can do this by finding your name in the [GitHub organisation list][2] and change the dropdown to public.
[1]: https://github.com/settings/organizations
[2]: https://github.com/orgs/Voninc/people
# Invite_to_Organization:
# runs-on: ubuntu-latest
# needs: Comment_on_Issue
# steps:
# - name: Invite User using Github CLI with JSON Payload
# run: |
# echo '{"invitee_id":${USERID}, "role":"direct_member"}' | \
# gh api \
# --method POST \
# -H "Accept: application/vnd.github+json" \
# -H "X-GitHub-Api-Version: 2022-11-28" \
# /orgs/${ORGANIZATION}/invitations \
# --input -
# env:
# ORGANIZATION: ${{ github.event.organization.login }}
# USERID: ${{ github.event.issue.user.id }}
# GITHUB_TOKEN: ${{ secrets.TOKEN }}