fix: removing leading slash from the ask command
This commit is contained in:
@@ -14,7 +14,7 @@ on:
|
|||||||
type: "string"
|
type: "string"
|
||||||
|
|
||||||
comment_body:
|
comment_body:
|
||||||
description: "full body of the triggering comment, including the /ask prefix"
|
description: "full body of the triggering comment, including the ask prefix"
|
||||||
required: true
|
required: true
|
||||||
type: "string"
|
type: "string"
|
||||||
|
|
||||||
@@ -29,14 +29,14 @@ jobs:
|
|||||||
timeout-minutes: 300
|
timeout-minutes: 300
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Answer /ask command
|
- name: Answer ask command
|
||||||
env:
|
env:
|
||||||
COMMENT_BODY: ${{ inputs.comment_body }}
|
COMMENT_BODY: ${{ inputs.comment_body }}
|
||||||
ISSUE_NUMBER: ${{ inputs.issue_number }}
|
ISSUE_NUMBER: ${{ inputs.issue_number }}
|
||||||
COMMENT_ID: ${{ inputs.comment_id }}
|
COMMENT_ID: ${{ inputs.comment_id }}
|
||||||
PULL_REQUEST_HTML_URL: ${{ inputs.pull_request_html_url }}
|
PULL_REQUEST_HTML_URL: ${{ inputs.pull_request_html_url }}
|
||||||
run: |
|
run: |
|
||||||
question="${COMMENT_BODY#/ask}"
|
question="${COMMENT_BODY#ask }"
|
||||||
question="$(echo "$question" | sed -e 's/^[[:space:]]*//')"
|
question="$(echo "$question" | sed -e 's/^[[:space:]]*//')"
|
||||||
container="pr-ask-${ISSUE_NUMBER}-${COMMENT_ID}"
|
container="pr-ask-${ISSUE_NUMBER}-${COMMENT_ID}"
|
||||||
docker rm -f "$container" 2>/dev/null || true
|
docker rm -f "$container" 2>/dev/null || true
|
||||||
|
|||||||
Reference in New Issue
Block a user