diff --git a/README.md b/README.md index 70c6bea..cbe08a3 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ You can also mention users by providing the necessary information described in t ### mentionPairs -Provide a list of githubUsername-slackMemberId comma separated +Provide a list of githubUsername::slackMemberId space separated -> ferran-U0111, clara-U0121 +> ferran::U0111 clara::U0121 When this field is populated then all githubUsername's that appear in the **text** field will be mentioned in slack @@ -41,5 +41,5 @@ When this field is populated then all githubUsername's that appear in the **text color: danger text: This is a danger example text for ferran webhook: ${{ secrets.SLACK_WEBHOOK_URL }} - mentionPairs: ferran-U0111, clara-U0121 + mentionPairs: ferran::U0111 clara::U0121 ``` diff --git a/action.yml b/action.yml index a0d81cf..8f69656 100644 --- a/action.yml +++ b/action.yml @@ -12,7 +12,7 @@ inputs: description: 'Your slack channel webhook' required: true mentionPairs: - description: 'A list of githubUsername-slackMemberId comma separated to use for mentioning a githubHusername in the text field in Slack' + description: 'A list of githubUsername::slackMemberId space separated to use for mentioning a githubHusername in the text field in Slack' required: false runs: using: 'docker' diff --git a/entrypoint.sh b/entrypoint.sh index caf7d31..9f770ed 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,7 +4,7 @@ # 1. color # 2. text # 3. webhook -# 4. usernameslackmap: "carlos-abc, jose-123" +# 4. usernameslackmap: "carlos::abc jose::123" # ./entrypoint.sh "good" "Hello zegnus" "https://hooks.slack.com/services/..." "true" "zegnus-U000000, laith-U11111" @@ -13,11 +13,11 @@ textInput=${2} if [ ! -z "$4" ] then gitSlackPair=${4} - arrayGitSlack=($(echo $gitSlackPair | tr ',' "\n")) + arrayGitSlack=($(echo $gitSlackPair | tr ' ' "\n")) for i in "${arrayGitSlack[@]}" do - gitSlack=($(echo $i | tr '-' "\n")) + gitSlack=($(echo $i | tr '::' "\n")) gitName=${gitSlack[0]} slackCode=${gitSlack[1]} textInput="${textInput/$gitName/<@$slackCode>}"