Skip to content

Commit d6c3e70

Browse files
authored
Merge pull request #155 from p-costa/fix_send_tweet
fixed important issue thanks to @JarLob
2 parents fcb4666 + 66407fd commit d6c3e70

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/gen_tweet.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ jobs:
8282
# ${{env.UNTWEET_KEYWORD}} removed previous tweet [above](${{steps.get-comment-url.outputs.comment-url}}).
8383
- name: extract the new tweet message
8484
id: get-comment-body
85+
env:
86+
COMMENT_BODY: ${{github.event.comment.body}}
8587
run: |
86-
body=$(echo "${{github.event.comment.body}}" | sed '1 s/#tweet//' | sed '1 s/ //')
88+
body=$(echo "$COMMENT_BODY" | sed '1 s/#tweet//' | sed '1 s/ //')
8789
echo ::set-output name=tweet_length::$(echo $body | tr -d '\n\r%' | wc -c)
8890
body_quote=$(echo $body | sed 's/^/> /')
8991
# escape string content to preserve new lines

.github/workflows/send_tweet.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ jobs:
2121
- name: if tweet CI comment is found, extract tweet from comment body
2222
id: extract-tweet
2323
if: ${{steps.fc.outputs.comment-id != null}}
24+
env:
25+
COMMENT_BODY: ${{steps.fc.outputs.comment-body}}
2426
run: |
25-
body=$(echo "${{steps.fc.outputs.comment-body}}" | sed '1d' | sed 's/> //')
27+
body=$(echo "$COMMENT_BODY" | sed '1d' | sed 's/> //')
2628
# escape file content to preserve new lines
2729
# (see example in https://github.com/peter-evans/create-or-update-comment)
2830
body="${body//'%'/'%25'}"

0 commit comments

Comments
 (0)