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

Conversation

JoshuaKGoldberg
Copy link
Owner

PR Checklist

Overview

Makes the passive aggressive phrasing slightly less so, and tags the user with it.

cc @Pinjasaur - should make testing #52 smoother!

@@ -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'
    }
  ]
}

@JoshuaKGoldberg
Copy link
Owner Author

@all-contributors please add @JoshuaKGoldberg for code.

🤖 Beep boop! This comment was added automatically by all-contributors-auto-action.
Not all contributions can be detected from Git & GitHub alone. Please comment any missing contribution types this bot missed.
...and of course, thank you for contributing! 💙

Copy link
Contributor

@JoshuaKGoldberg

We had trouble processing your request. Please try again later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant