Skip to content

Commit

Permalink
Merge pull request #87 from Asymtode712/main
Browse files Browse the repository at this point in the history
Moved invitation to Support repo completely
  • Loading branch information
sanjay-kv committed May 24, 2024
2 parents 4b6710a + a4e07f8 commit a3ed1e9
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/invitation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Invitation to the Recode-Hive GitHub Community Organization
description: I would like to be part of this awesome community
title: "Please invite me to the Recode-Hive GitHub Community Organization"
labels: [invite me to the community]
body:
- type: input
id: name
attributes:
label: Name
placeholder: Insert your name here
validations:
required: true
- type: input
id: discordname
attributes:
label: Discord Username (if applicable)
placeholder: Insert your Discord username here
validations:
required: false
- type: textarea
id: Additional
attributes:
label: Additional Context
description: What do you like about this community/Why do you want to join?
validations:
required: false
- type: markdown
attributes:
value: |
Feel free to check out other cool repositories of the Recode-Hive Community [here](https://github.com/Recode-Hive)
45 changes: 45 additions & 0 deletions .github/workflows/invite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Automate Invitation

on:
issues:
types: [labeled]

jobs:
handle_label:
runs-on: ubuntu-latest

steps:
- name: Check if Label is 'invite me to the community'
id: check_label
run: |
if [[ "${{ github.event.label.name }}" != "invite me to the community" ]]; then
echo "Label is not 'invite me to the community'. Exiting."
exit 0
fi
- name: Close Original Issue in Support Repository
if: ${{ steps.check_label.outcome == 'success' }}
uses: actions/github-script@v5
with:
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
script: |
const issue = context.payload.issue;
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
state: 'closed'
});
- name: Invite on Label
if: ${{ steps.check_label.outcome == 'success' }}
uses: vj-abigo/invite-on-label@v1.2
with:
organization: Recode-Hive
label: invite me to the community
repo-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
comment: |
<b>Invitation sent to join the GitHub Organisation. Welcome to the community 🎉</b><br><br>
Don't forget after accepting to make it public 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 and change the dropdown to public https://github.com/orgs/Recode-Hive/people<br><br>
env:
INVITE_TOKEN: ${{ secrets.INVITE_TOKEN }}

0 comments on commit a3ed1e9

Please sign in to comment.