12345678910111213141516171819202122232425262728293031323334353637 |
- name: get-maintainers
- on:
- pull_request:
- types: [opened, reopened]
- permissions:
- pull-requests: write
- jobs:
- get_maintainers:
- runs-on: ubuntu-22.04
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 10
- - name: Get commit branch and commit message from PR
- run: |
- echo "BRANCH_NAME=$GITHUB_HEAD_REF" >> $GITHUB_ENV
- echo "TARGET_BRANCH_NAME=$(echo ${GITHUB_BASE_REF##*/})" >> $GITHUB_ENV
- echo "COMMIT_MESSAGE<<EOF" >> $GITHUB_ENV
- echo "$(git log --format=%B -n 1 HEAD^2)" >> $GITHUB_ENV
- echo "EOF" >> $GITHUB_ENV
- echo "PREVIOUS_COMMIT=$(git log --format=%H -n 1 HEAD^2~1)" >> $GITHUB_ENV
- - uses: actions/setup-python@v4
- with:
- python-version: '3.10'
- architecture: 'x64'
- - name: Save PR number
- run: |
- mkdir -p ./maintainers
- echo ${{ github.event.number }} > ./maintainers/NR
- - name: Get Maintainers
- run: |
- python ./toolset/github_actions/get_maintainers.py > ./maintainers/maintainers.md
- - name: Save Maintainers
- uses: actions/upload-artifact@v3
- with:
- name: maintainers
- path: maintainers/
|