Skip to content

Commit f052dd2

Browse files
committed
feat: better detect if pull request
1 parent 8e95bec commit f052dd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/pull-request-commands.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
pre-deploy:
2626
# check if the comment comes from a pull request and contains the command `/deploy`
27-
if: contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/deploy')
27+
if: github.event.issue.pull_request && contains(github.event.comment.body, '/deploy')
2828
runs-on: ubuntu-latest
2929
steps:
3030
- run: |
@@ -34,7 +34,7 @@ jobs:
3434
3535
deploy:
3636
# check if the comment comes from a pull request and contains the command `/deploy`
37-
if: contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/deploy')
37+
if: github.event.issue.pull_request && contains(github.event.comment.body, '/deploy')
3838
needs: [get-pr-branch-name, pre-deploy]
3939
uses: ./.github/workflows/util-build-and-deploy.yaml
4040
with:

0 commit comments

Comments
 (0)