COmment test 3 #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Send Organization Invite | |
on: | |
issues: | |
types: [opened, reopened] | |
env: | |
GH_TOKEN: ${{ github.token }} | |
permissions: | |
actions: write | |
issues: write | |
jobs: | |
Dump_Github_Context: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dump Github context | |
run: echo '${{ toJSON(github.event) }}' | jq | |
shell: bash | |
Comment_on_Issue: | |
runs-on: ubuntu-latest | |
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] | |
[1]: https://github.com/settings/organizations | |
Invite_to_Organization: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Invite User using Github CLI | |
run: | | |
gh api \ | |
--method POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
/orgs/${ORGANIZATION}/invitations \ | |
-f invitee_id='${USERID}' \ | |
-f role='direct_member' \ | |
env: | |
ORGANIZATION: ${{ github.event.organization.login }} | |
USERID: ${{ github.event.issue.user.id }} | |