Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tooling: add example template to .github/replies.yml #73

Merged
merged 1 commit into from
Nov 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/replies.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
replies:
- body: |
<img width="488" alt="Maury meme: You checked 'I have searched for related issues'. A cursory issue search related issues determined that was a lie." src="https://user-images.githubusercontent.com/3335181/186501430-7f4c481a-f557-48b0-826c-74bb8434f4d5.png">\
Dup of #<insert issue>. Next time, please use the search 🙂.
Duplicate of #<insert issue>. Thanks for posting @{{user.login}} - though, next time, please use the search. 😄
Copy link
Owner Author

@JoshuaKGoldberg JoshuaKGoldberg Nov 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@

I tested this locally with node on the CLI to confirm this wouldn't cause YAML parsing to barf:

const yaml = require("js-yaml");
const fs = require("fs");

text = fs.readFileSync(".github/replies.yml").toString()
'replies:\n' +
  '  - body: |\n' +
  `      <img width="488" alt="Maury meme: You checked 'I have searched for related issues'. A cursory issue search related issues determined that was a lie." src="https://user-images.githubusercontent.com/3335181/186501430-7f4c481a-f557-48b0-826c-74bb8434f4d5.png">\\\n` +
  '      Duplicate of #<insert issue>. Thanks for posting @{{user.login}} - though, next time, please use the search. 😄\n' +
  '    name: Clearly Duplicate Issue\n'

config = yaml.load(text);
{
  replies: [
    {
      body: `<img width="488" alt="Maury meme: You checked 'I have searched for related issues'. A cursory issue search related issues determined that was a lie." src="https://user-images.githubusercontent.com/3335181/186501430-7f4c481a-f557-48b0-826c-74bb8434f4d5.png">\\\n` +
        'Duplicate of #<insert issue>. Thanks for posting @{{user.login}} - though, next time, please use the search. 😄\n',
      name: 'Clearly Duplicate Issue'
    }
  ]
}

name: Clearly Duplicate Issue