Skip to content

Welcome new contributors by greeting them with a welcome message when they open a new issue/PR

License

Notifications You must be signed in to change notification settings

garg3133/welcome-new-contributors

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. 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

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

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

About

Welcome new contributors by greeting them with a welcome message when they open a new issue/PR

Resources

License

Stars

Watchers

Forks

Packages

No packages published