Skip to content

Commit 395eaf7

Browse files
committed
Chore: Use non-interpolating single quotes in Tweet action
RFC #73 originally included backticks around <code>`only`</code>. The automated tweet omitted "only" and its backticks. I realized that the `run` action command was using double quotes, so the backticks from the PR title were being interpreted by the shell as command substitution. Using single quotes disables any interpolation. Thankfully only contributors can trigger the automated tweet by labeling or merging an RFC, and we'd notice something like `curl example.com?secret=$SECRET`, so this isn't really a security issue.
1 parent f2b0634 commit 395eaf7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/tweet-rfc-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/setup-node@v1
1212
with:
1313
node-version: 12
14-
- run: npx @humanwhocodes/tweet "The RFC '${{ github.event.pull_request.title }}' is now in the ${{ github.event.label.name }} phase.\n\n${{ github.event.pull_request.html_url }}"
14+
- run: npx @humanwhocodes/tweet 'The RFC "${{ github.event.pull_request.title }}" is now in the ${{ github.event.label.name }} phase.\n\n${{ github.event.pull_request.html_url }}'
1515
env:
1616
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
1717
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/setup-node@v1
2626
with:
2727
node-version: 12
28-
- run: npx @humanwhocodes/tweet "The RFC '${{ github.event.pull_request.title }}' has been approved and merged!\n\n${{ github.event.pull_request.html_url }}"
28+
- run: npx @humanwhocodes/tweet 'The RFC "${{ github.event.pull_request.title }}" has been approved and merged!\n\n${{ github.event.pull_request.html_url }}'
2929
env:
3030
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
3131
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}

0 commit comments

Comments
 (0)