Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/garg3133/welcome-new-contributors
Welcome new contributors by greeting them with a welcome message when they open a new issue/PR
https://github.com/garg3133/welcome-new-contributors
Last synced: 17 days ago
JSON representation
Welcome new contributors by greeting them with a welcome message when they open a new issue/PR
- Host: GitHub
- URL: https://github.com/garg3133/welcome-new-contributors
- Owner: garg3133
- License: mit
- Created: 2021-02-06T13:02:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-11T18:07:11.000Z (almost 4 years ago)
- Last Synced: 2024-10-26T08:41:30.600Z (19 days ago)
- Language: JavaScript
- Homepage:
- Size: 92.8 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Welcome New Contributors
Use this action to welcome new contributors into your community. This action posts a welcome message whenever a new contributor opens his/her first issue or PR in your repository.Additionally, you can also create your own bot account and use it to post the welcome messages instead of using the default `github-actions` bot.
This action is inspired by [first-interaction](https://github.com/actions/first-interaction). Thanks to all the contributors of first-interaction.
# Usage
#### Sample usage while using the default `github-actions` bot to post the welcome messages:
(Create a new workflow file (`workflowName.yml`) in `.github/workflows` directory of your repository and add the following code, with required changes in `issue-message` and `pr-message`)
```
name: 'Welcome New Contributors'on:
issues:
types: [opened]
pull_request_target:
types: [opened]jobs:
welcome-new-contributor:
runs-on: ubuntu-latest
steps:
- name: 'Greet the contributor'
uses: garg3133/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Hello there, thanks for opening your first issue. We welcome you to the community!'
pr-message: 'Hello there, thanks for opening your first Pull Request. Someone will review it soon.'
```![github-actions-bot](assets/github-actions-bot.png)
#### Sample usage while using your own bot to post the welcome messages:
* Create a new GitHub account to be used as the bot.
* Add that GitHub account as a collaborator on your repository (so that it has permissions to write on your repository).
* Go to `Settings > Developer settings > Personal access tokens` and create a new token for this action so that this action can use your bot account to comment on issue/PRs).
* Go to your repository in which you want to use this action, open `Settings > Secrets > New repository secret` and add `BOT_ACCESS_TOKEN` as name and the token you copied in the above step as value.
* Now, create a new workflow file (`workflowName.yml`) in `.github/workflows` directory of your repository and add the following code (with required changes in `issue-message` and `pr-message`)
```
name: 'Welcome New Contributors'on:
issues:
types: [opened]
pull_request_target:
types: [opened]jobs:
welcome-new-contributor:
runs-on: ubuntu-latest
steps:
- name: 'Greet the contributor'
uses: garg3133/[email protected]
with:
token: ${{ secrets.BOT_ACCESS_TOKEN }}
is-oauth-token: true
issue-message: 'Hello there, thanks for opening your first issue. We welcome you to the community!'
pr-message: 'Hello there, thanks for opening your first Pull Request. Someone will review it soon.'
```![Jagrati-Bot](assets/Jagrati-Bot.png)
### Want to tag the contributor in the message?
Use `@contributor_name` anywhere in the message and it will be automatically replaced by the contributor's username.# License
The scripts and documentation in this project are released under the [MIT License](https://github.com/garg3133/welcome-new-contributors/blob/main/LICENSE)