Skip to content

Commit 7b67f30

Browse files
committed
use regex instead
1 parent 37715f1 commit 7b67f30

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/add_to_project.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,19 @@ jobs:
1515
name: Add pull request to project
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/add-to-project@v1.0.2
19-
if: contains(github.event.pull_request.title, 'l1') || contains(github.event.pull_request.title, 'levm') || contains(github.event.pull_request.title, 'core')
18+
- name: Check PR title with regex
19+
id: check_title
20+
run: |
21+
title="${{ github.event.pull_request.title }}"
22+
if [[ "$title" =~ .*l1.* || "$title" =~ .*levm.* || "$title" =~ .*core.* ]]; then
23+
echo "match=true" >> $GITHUB_OUTPUT
24+
else
25+
echo "match=false" >> $GITHUB_OUTPUT
26+
fi
27+
28+
- name: Add to project if title matches
29+
if: steps.check_title.outputs.match == 'true'
30+
uses: actions/add-to-project@v1.0.2
2031
with:
21-
project-url: https://github.com/orgs/lambdaclass/projects/31 # ethrex_l1 project number
32+
project-url: https://github.com/orgs/lambdaclass/projects/31
2233
github-token: ${{ secrets.GH_PROJECT_PERSONAL_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)