Skip to content

Commit

Permalink
docs: for existingMemberMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
vj-abishek committed Jan 19, 2022
1 parent 573855c commit 6f0c6ce
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
This action allows you to auto-invite people to your org. after they open an issue, with a specific label.

### How to use

- Go to your repository
- Create a folder named `.github` and create a `workflows` folder inside it if it doesn't exist.
- Create a new file named `invitation.yml` with the following contents inside the `workflows` folder:

```yml
on:
issues:
Expand All @@ -26,16 +28,16 @@ jobs:
comment: 'Welcome to the Org.'
env:
INVITE_TOKEN: ${{ secrets.INVITE_TOKEN }}
```
```
- Replace the `organization` name to put in name of your org, replace the `label` with name of the label with which you want this action to be triggered.
- Replace `comment` with the message you want the github-actions bot to send after an invite is sent.
- **NOTE:** create a [personal access token](https://github.com/settings/tokens/new) called _`INVITE_TOKEN`_ _(or give it another name, but don't forget to change it in the workflow)_ with the scope of _`admin:org`_ and set the expiration date as _`No expiration`_ _(If you don't want to regenerate token again)_
- **NOTE:** create a [personal access token](https://github.com/settings/tokens/new) called _`INVITE_TOKEN`_ _(or give it another name, but don't forget to change it in the workflow)_ with the scope of _`admin:org`_ and set the expiration date as _`No expiration`_ _(If you don't want to regenerate token again)_

![Give admin:org access to the token](https://user-images.githubusercontent.com/43115551/109795252-b450ac80-7c3c-11eb-8de7-5dc5d600f82e.png)

- Copy the generated token and navigate to your org's secrets(`Organization Settings > Secrets`) and create a `New Organization Secret` with the Name as `INVITE_TOKEN` and the value as the token that you copied in the previous step.
`https://github.com/organizations/*your-org-name*/settings/secrets/actions`
`https://github.com/organizations/*your-org-name*/settings/secrets/actions`
- You don't worry about the `GITHUB_TOKEN`, It will be given by GitHub

### Note:
Expand All @@ -48,19 +50,25 @@ jobs:

> Default comment: `Invitation sent for the GitHub Organisation. Welcome to the community`

**_existingMemberMessage_** _(optional)_ Message for existing organisation members

> Default Message: `You are already a member of our Organisation.`

### Examples

- [EddieHub invitation Workflow](https://github.com/EddieHubCommunity/support/blob/main/.github/workflows/invitation.yml)

### Contributing
Please see [`CONTRIBUTING.md`](./CONTRIBUTING.md) for getting started with the contribution. Make sure that you follow [`CODE_OF_CONDUCT.md`](./CODE_OF_CONDUCT.md) while contributing and engaging in the discussions. **When contributing, please first discuss the change you wish to make via an issue on this repository before making the actual change.**


Please see [`CONTRIBUTING.md`](./CONTRIBUTING.md) for getting started with the contribution. Make sure that you follow [`CODE_OF_CONDUCT.md`](./CODE_OF_CONDUCT.md) while contributing and engaging in the discussions. **When contributing, please first discuss the change you wish to make via an issue on this repository before making the actual change.**

#### ToDo-

- [ ] Better Docs
- [ ] Fix bugs, if any

#### Bugs-

If you feel any difficulty in usage or notice a bug, don't forget to [open a new issue](https://github.com/vj-abigo/invite-on-label/issues/new).

### Contributors
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ inputs:
existingMemberMessage:
description: Message for existing organisation members
required: false
default: You are already the member of our Organisation.
default: You are already a member of our Organisation.
runs:
using: node12
main: dist/index.js

0 comments on commit 6f0c6ce

Please sign in to comment.