Merge pull request #28618 from Expensify/tgolen-refactor-request-navi… #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Post new contributor welcome message | |
on: | |
push: | |
branches: [main] | |
jobs: | |
newContributorWelcomeMessage: | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'OSBotify' && github.actor != 'imgbot[bot]' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get merged pull request | |
id: getMergedPullRequest | |
run: | | |
read -r number author < <(gh pr list --search ${{ github.sha }} --state merged --json 'number,author' | jq -r '.[0] | [.number, .author.login] | join(" ")') | |
echo "number=$number" >> "$GITHUB_OUTPUT" | |
echo "author=$author" >> "$GITHUB_OUTPUT" | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Check whether the PR author is member of Expensify/expensify team | |
id: isExpensifyEmployee | |
run: | | |
if gh api /orgs/Expensify/teams/expensify-expensify/memberships/${{ steps.getMergedPullRequest.outputs.author }} --silent; then | |
echo "IS_EXPENSIFY_EMPLOYEE=true" >> "$GITHUB_OUTPUT" | |
else | |
echo "IS_EXPENSIFY_EMPLOYEE=false" >> "$GITHUB_OUTPUT" | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} | |
- name: Get PR count for ${{ steps.getMergedPullRequest.outputs.author }} | |
id: getPRCount | |
run: echo "PR_COUNT=$(gh pr list --author ${{ steps.getMergedPullRequest.outputs.author }} --state any | grep -c '')" >> "$GITHUB_OUTPUT" | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Comment on ${{ steps.getMergedPullRequest.outputs.author }}\'s first pull request! | |
if: ${{ fromJSON(steps.getPRCount.outputs.PR_COUNT) == 1 }} | |
run: | | |
gh pr comment ${{ steps.getMergedPullRequest.outputs.number }} --body \ | |
"@${{ steps.getMergedPullRequest.outputs.author }}, Great job getting your first Expensify/App pull request over the finish line! :tada: | |
I know there's a lot of information in our [contributing guidelines](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md), so here are some points to take note of :memo:: | |
1. Now that your first PR has been merged, you can be hired for another issue. Once you've completed a few issues, you may be eligible to work on more than one job at a time. | |
2. Once your PR is deployed to our staging servers, it will undergo quality assurance (QA) testing. If we find that it doesn't work as expected or causes a regression, you'll be responsible for fixing it. Typically, we would revert this PR and give you another chance to create a similar PR without causing a regression. | |
3. Once your PR is deployed to _production_, we start a 7-day timer :alarm_clock:. After it has been on production for 7 days without causing any regressions, then we pay out the Upwork job. :moneybag: | |
So it might take a while before you're paid for your work, but we typically post multiple new jobs every day, so there's plenty of opportunity. I hope you've had a positive experience contributing to this repo! :blush:" | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |