Code Monkey home page Code Monkey logo

welcome's Introduction

Welcome

build MIT License Language PRs Welcome website Language grade: JavaScript

Welcome new users by creating a comment in the first time issue/PR

first-issue

Usage

Create a .github/workflows/welcome.yml file in the repository you want to install this action, then add the following to it:

name: Welcome
on:
  pull_request:
    types: [opened, closed]
  issues:
    types: [opened]
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: wow-actions/welcome@v1
        with:
          FIRST_ISSUE: |
            πŸ‘‹ @{{ author }}
             Thanks for opening your first issue here! Be sure to follow the issue template!

          FIRST_PR: |
            πŸ‘‹ @{{ author }}
            Thanks for opening this pull request! Please check out our contributing guidelines.

          FIRST_PR_MERGED: |
            πŸŽ‰ @{{ author }}
            Congrats on merging your first pull request! We here at behaviorbot are proud of you!

          STAR_MESSAGE: If you like this project, please ⭐star⭐ our repo.

Inputs

Various inputs are defined to let you configure the action:

Note: Workflow command and parameter names are not case-sensitive.

Name Description Default
GITHUB_TOKEN The GitHub token for authentication. ${{ github.token }}
FIRST_ISSUE
or
FIRST_ISSUE_COMMENT
Comment to be posted to on first time issues.
FIRST_ISSUE_REACTIONS Reactions to be add to comment on first time issues.
FIRST_PR
or
FIRST_PR_COMMENT
Comment to be posted to on PRs from first time contributors in your repository.
FIRST_PR_REACTIONS Reactions to be add to comment on PRs from first time contributors in your repository.
FIRST_PR_MERGED
or
FIRST_PR_MERGED_COMMENT
Comment to be posted to on pull requests merged by a first time user.
FIRST_PR_MERGED_REACTIONS Reactions to be add to comment on pull requests merged by a first time user.
STAR_MESSAGE Message in the comment to tip non-stargazers to star our repo.

Available reactions:

content emoji
+1 πŸ‘
-1 πŸ‘Ž
laugh πŸ˜„
confused πŸ˜•
heart ❀️
hooray πŸŽ‰
rocket πŸš€
eyes πŸ‘€

Other examples

Config for First Issue

name: Welcome
on:
  issues:
    types: [opened]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: wow-actions/welcome@v1
        with:
          FIRST_ISSUE_REACTIONS: '+1, hooray, rocket, heart'
          FIRST_ISSUE_COMMENT: |
            πŸ‘‹ @{{ author }}
             Thanks for opening your first issue here! Be sure to follow the issue template!

Config for First PR

name: Welcome
on:
  pull_request:
    types: [opened]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: wow-actions/welcome@v1
        with:
          FIRST_PR_REACTIONS: '+1, hooray, rocket, heart'
          FIRST_PR_COMMENT: |
            πŸ‘‹ @{{ author }}
            Thanks for opening this pull request! Please check out our contributing guidelines.

License

The scripts and documentation in this project are released under the MIT License

welcome's People

Contributors

bubkoo avatar keisukeyamashita avatar wow-actions-bot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

welcome's Issues

This action will run on the robot and throw error

This action will run on the robot and throw error

Expected Behavior

Nothing happen.

Current Behavior

Action run fail with error The listed users cannot be searched either because the users do not exist or you do not have permission to view the users.

Possible Solution

Do not run on GitHub robots.

Steps To Reproduce

  1. Add this action.
  2. Add a bot such as dependabot
  3. Trigger the dependabot to run and create a pull request.
  4. The action will fail with error Validation Failed: {"message":"The listed users cannot be searched either because the users do not exist or you do not have permission to view the users.","resource":"Search","field":"q","code":"invalid"}

image

Additional Context

Unnecessary

Your Environment

Unnecessary

Throws a "Resource not accessible by integration" error

We are seeing a "Resource not accessible by integration" when this is run. Here is our workflow file: https://github.com/freeCodeCamp/freeCodeCamp/actions/runs/2503722663/workflow

Expected Behavior

The workflow should leave a comment on the PR by a first-timer.

Current Behavior

The workflow runs error out.

Possible Solution

Not sure how to approach debugging this better.

Steps To Reproduce

Here is a run with debug logs enabled to help analyze the issue: https://github.com/freeCodeCamp/freeCodeCamp/runs/6906136489?check_suite_focus=true#step:2:31

Error Message & Stack Trace

##[debug]Evaluating condition for step: 'Run wow-actions/welcome@v1'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Run wow-actions/welcome@v1
##[debug]Loading inputs
##[debug]Evaluating: secrets.GITHUB_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'GITHUB_TOKEN'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run wow-actions/welcome@v1
  with:
    GITHUB_TOKEN: ***
    FIRST_PR_MERGED: #### :sparkles: :tada: **AWESOME!** :tada: :sparkles:
  
  Hi @{{ author }},
  
  Thanks for this pull request and for contributing to the code-base for the first time. We are looking forward to more contributions from you in the future.
  
  Cheers & happy contributing!
  
##[debug]event: pull_request
##[debug]action: closed
Error: HttpError: Resource not accessible by integration
Error: Resource not accessible by integration
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Run wow-actions/welcome@v1

Additional Context

We have set up the workflow as recommended in the docs for the workflow.

Your Environment

GitHub Actions on Ubuntu 20.04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.