diff --git a/README.md b/README.md
index 752104a..459f399 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,8 @@
This GitHub Action lets a prospective contributor assign themselves to an issue, and optionally leaves a comment on the issue.
+- `message`
The message to display to the user once they have assigned themselves to an issue.
+- `trigger`
The string that take action will search for in the comment body to activate the action.
## Setup
@@ -27,4 +29,5 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
message: Thanks for taking this issue! Let us know if you have any questions!
+ trigger: .take
```
diff --git a/action.yml b/action.yml
index 662efd3..d3960aa 100644
--- a/action.yml
+++ b/action.yml
@@ -14,6 +14,10 @@ inputs:
description: 'Message to contributors if issue is already assigned'
required: false
default: 'The issue you are trying to assign to yourself is already assigned.'
+ trigger:
+ description: 'The string that triggers the action'
+ required: false
+ default: '.take'
runs:
using: "composite"
@@ -27,7 +31,7 @@ runs:
ISSUE_JSON="$(jq '.issue' $GITHUB_EVENT_PATH)"
ISSUE_CURRENTLY_ASSIGNED=`echo $ISSUE_JSON | jq '.assignees | length == 0'`
- if [[ $BODY == *".take"* ]]; then
+ if [[ $BODY == *"$INPUT_TRIGGER"* ]]; then
if [[ "$ISSUE_CURRENTLY_ASSIGNED" == true ]]; then
echo "Is issue currently assigned: $ISSUE_CURRENTLY_ASSIGNED"
echo "Assigning issue $ISSUE_NUMBER to $LOGIN"
@@ -48,4 +52,5 @@ runs:
shell: bash
env:
INPUT_MESSAGE: "${{ inputs.message }}"
+ INPUT_TRIGGER: "${{ inputs.trigger }}"
ISSUE_CURRENTLY_ASSIGNED_MESSAGE: "${{ inputs.issueCurrentlyAssignedMessage }}"