Skip to content

ci(testing): add pr to project automatically #12

ci(testing): add pr to project automatically

ci(testing): add pr to project automatically #12

name: Add PR to Project
on:
pull_request:
types:
- opened
- edited
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
add-to-project:
name: Add pull request to project
runs-on: ubuntu-latest
steps:
- name: Check PR title with regex
id: check_title
run: |
title="${{ github.event.pull_request.title }}"
if [[ "$title" =~ .*l1.* || "$title" =~ .*levm.* || "$title" =~ .*core.* ]]; then
echo "match=true" >> $GITHUB_OUTPUT
else
echo "match=false" >> $GITHUB_OUTPUT
fi
- name: Add to project if title matches
if: steps.check_title.outputs.match == 'true'
uses: actions/add-to-project@v1.0.2
with:
project-url: https://github.com/orgs/lambdaclass/projects/31
github-token: ${{ secrets.GH_PROJECT_PERSONAL_ACCESS_TOKEN }}