Skip to content

Update CONTRIBUTING.md #23

Update CONTRIBUTING.md

Update CONTRIBUTING.md #23

name: Validate New Contributor
on:
pull_request:
types: [opened, edited]
branches:
- new_contributor_validations # TODO: use main
paths:
- 'CONTRIBUTING.md'
workflow_call:
inputs:
pull-request-number:
required: true
type: number
secrets:
GH_TOKEN:
required: true
env:
PYTHON_VERSION: 3.11
WORKING_DIR: .github/scripts/python/validate-new-contributor
jobs:
validate:
runs-on: ubuntu-latest
outputs:
email-address: ${{ steps.output-email-address.outputs.EMAIL_ADDRESS }}
steps:
# - name: Set Pull Request Number
# run: |
# if [ "${{ github.event_name }}" == "pull_request" ]
# then
# echo "PR_NUM=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
# echo "PR_NUM=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
# else
# echo "PR_NUM=${{ inputs.pull-request-number }}" >> $GITHUB_ENV
# fi
# - name: 🛫 Checkout
# uses: actions/checkout@v4
# with:
# ref: refs/pull/${{ inputs.pull-request-number }}/head
# - name: 🛫 Checkout
# run: gh pr checkout ${{ inputs.pull-request-number }}
# env:
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
- uses: ocadotechnology/codeforlife-workspace/.github/actions/python/setup-environment@new_contributor_validations # TODO: use @main
with:
checkout: 'false'
python-version: ${{ env.PYTHON_VERSION }}
working-directory: ${{ env.WORKING_DIR }}
# - name: 🕵️ Validate New Contributor
# working-directory: ${{ env.WORKING_DIR }}
# run: pipenv run python validate_new_contributor.py
- name: 📧 Output Email Address
if: github.event_name != 'pull_request'
id: output-email-address
run: echo "[email protected]" >> "$GITHUB_OUTPUT"