Skip to content

Commit 8ea34be

Browse files
committed
Use payload.pr_number
1 parent 899a156 commit 8ea34be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
PAYLOAD_REF: ${{ github.event.client_payload.ref }}
1313
PAYLOAD_SHA: ${{ github.event.client_payload.sha }}
1414
PAYLOAD_REPOSITORY: ${{ github.event.client_payload.repository }}
15-
PAYLOAD_COMMIT_MESSAGE: ${{ github.event.client_payload.commit_message }}
15+
PAYLOAD_PR_NUMBER: ${{ github.event.client_payload.pr_number }}
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up Ruby

parse_commit_message.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env ruby
22

33
message =
4-
if ENV["PAYLOAD_COMMIT_MESSAGE"].to_s =~ /\AMerge pull request (#\d+)/
4+
if ENV["PAYLOAD_PR_NUMBER"].to_s =~ /^(\d+)$/
55
"#{ENV["PAYLOAD_REPOSITORY"]}#{\$1}"
66
else
77
"#{ENV["PAYLOAD_REPOSITORY"]}@#{ENV["PAYLOAD_SHA"]} (#{ENV["PAYLOAD_REF"]})"

0 commit comments

Comments
 (0)