Skip to content

Commit c9cc05b

Browse files
authored
Pr comment (#8710)
1 parent 6be5962 commit c9cc05b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/release-patch-from-comment.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
dry_run=false
3030
3131
- name: 'Acknowledge Patch Command'
32-
if: "steps.slash_command.outputs.dispatched == 'true'"
32+
if: "contains(github.event.comment.body, '/patch')"
3333
uses: 'peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d'
3434
with:
3535
issue-number: '${{ github.event.issue.number }}'
@@ -52,16 +52,17 @@ jobs:
5252
uses: 'actions/github-script@00f12e3e20659f42342b1c0226afda7f7c042325'
5353
with:
5454
script: |
55-
const args = JSON.parse('${{ steps.slash_command.outputs.command-arguments }}');
55+
const argsStr = '${{ steps.slash_command.outputs.command-arguments }}';
56+
const args = argsStr ? JSON.parse(argsStr) : {};
5657
github.rest.actions.createWorkflowDispatch({
5758
owner: context.repo.owner,
5859
repo: context.repo.repo,
5960
workflow_id: 'release-patch-1-create-pr.yml',
6061
ref: 'main',
6162
inputs: {
6263
commit: '${{ steps.pr_status.outputs.MERGE_COMMIT_SHA }}',
63-
channel: args.channel,
64-
dry_run: args.dry_run
64+
channel: args.channel || 'stable',
65+
dry_run: args.dry_run || 'false'
6566
}
6667
})
6768

0 commit comments

Comments
 (0)