first-interaction
first-interaction copied to clipboard
Workflow displaying error: yaml: line 11: did not find expected key
I committed a greeting action via the main Actions homepage (one of the templates) and customized the messages.
name: Greetings
on: [pull_request, issues]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Hey, thanks for opening your first issue! 🙂 Be sure to check out the contribution guidelines if you haven't already. Thanks!'
pr-message: 'Hey, congratulations on your first pull request for HACC! 🎉'
On the Actions tab for a commit, a few things are off:
- The "runs on" field says "push", but should say "pull_request, issues"
- It says the file is invalid, but this is an OOTB example
What am I doing wrong, or is this a bug with Actions since it's still in beta?
This works if you use double quotes instead of single quotes:
name: Greetings
on: [pull_request, issues]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hey, thanks for opening your first issue! 🙂 Be sure to check out the contribution guidelines if you haven't already. Thanks!"
pr-message: "Hey, congratulations on your first pull request for HACC! 🎉"
@jclem do you know why this is getting a validation error (or who this should get routed to)?
This issue is likely due to unescaped single quotes in the issue-message
and pr-mesage
in the provided example on the README or the issue-message
above. This is why the double quotes works. The above haven't
would need to be escaped.
From the README example, all instances of users'
would need to escaped:
issue-message: '# Message with markdown.\nThis is the message that will be displayed on users' first issue.'
pr-message: 'Message that will be displayed on users' first pr. Look, a `code block` for markdown.'
Note to escape single quotes you would actually do (double single quotes):
issue-message: '# Message with markdown.\nThis is the message that will be displayed on users'' first issue.'
Thanks for your help! :+1:
This should be resolved by #296 :)