2022-10-19 12:28:58 +00:00
|
|
|
name: External contributor greeter
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
|
|
|
|
env:
|
|
|
|
DRY_RUN: false
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
comment-external-pr:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-07-10 12:20:55 +00:00
|
|
|
# Note: this step requires that the INTERNAL_CONTRIBUTORS environment variable
|
|
|
|
# is already defined in the repository with the current json list of internal contributors.
|
2022-10-19 12:28:58 +00:00
|
|
|
- name: Comment on external contribution PR
|
2023-07-10 12:20:55 +00:00
|
|
|
if: "!contains(fromJSON(vars.INTERNAL_CONTRIBUTORS), github.event.pull_request.user.login)"
|
2022-10-19 12:28:58 +00:00
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
PR: ${{ github.event.pull_request.html_url }}
|
|
|
|
run: |
|
|
|
|
echo "Commenting in a newly submitted or reopened external PR: $PR"
|
|
|
|
if [[ $DRY_RUN == 'false' ]]; then
|
|
|
|
gh pr edit "$PR" --add-label "external contribution :star:"
|
|
|
|
comment_body=(
|
|
|
|
"Thank you for your contribution to the Solidity compiler! A team member will follow up shortly."
|
|
|
|
"\n\n"
|
|
|
|
"If you haven't read our [contributing guidelines](https://docs.soliditylang.org/en/latest/contributing.html) and our "
|
|
|
|
"[review checklist](https://github.com/ethereum/solidity/blob/develop/ReviewChecklist.md) before, "
|
|
|
|
"please do it now, this makes the reviewing process and accepting your contribution smoother."
|
|
|
|
"\n\n"
|
|
|
|
"If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the "
|
|
|
|
"[#solidity-dev](https://matrix.to/#/#ethereum_solidity-dev:gitter.im) channel on Matrix."
|
|
|
|
)
|
|
|
|
gh pr comment $PR --body "$(IFS='' ; echo -e "${comment_body[*]}")"
|
|
|
|
fi
|