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

feat: body-invalid-check #203

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: body-invalid-check #203

wants to merge 1 commit into from

Conversation

mtfoley
Copy link
Owner

@mtfoley mtfoley commented May 27, 2022

What type of PR is this? (check all applicable)

  • ♻️ Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 👷 Optimization
  • 📝 Documentation Update
  • 🔖 Release
  • 🚩 Other

Description

This change adds a compliance check to look for invalid content in the PR description, such as placeholders from PR templates that are meant to have been replaced.

Related Tickets & Documents

This PR resolves #199

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 readme
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

tick the boxes

cc @bdougie @0-vortex

@0-vortex
Copy link

The idea of checking a regex is great, not sure how this would affect templates or how it looks like :D

@mtfoley
Copy link
Owner Author

mtfoley commented May 27, 2022

The idea of checking a regex is great, not sure how this would affect templates or how it looks like :D

Yeah, I haven't tested this out yet. My thought would be to make a regex that would match the block of empty checkboxes perhaps, and blocks like this: "[adds/removes/fixes/replaces]", such as that found in: https://github.com/open-sauced/.github/blob/main/.github/PULL_REQUEST_TEMPLATE.md

@mtfoley
Copy link
Owner Author

mtfoley commented Jun 24, 2022

Tried this out with some regexes this evening. Doesn't work the way I thought, so needs some work.

@JoshuaKGoldberg
Copy link
Contributor

👋 @mtfoley these changes look very useful and I'm interested in seeing them merged. Is there anything I can help with?

@mtfoley
Copy link
Owner Author

mtfoley commented Dec 15, 2022

Hey @JoshuaKGoldberg, TL;DR = help would be appreciated, in whatever form you find suits you 👍

I totally agree on the usefulness. I think I got hung up on regular expression handling (e.g. which flags to assume, etc). In this branch ("placeholder-check"), the logic is mostly there, but I haven't taken the time to come up with a sensible way to apply one or more regexes to what is presumably a multiline input. To step out to a bigger picture of the use case, imagine if you have PR templates with placeholder text that you want the author to modify - how do you make sure they did it right? What if is a series of checkboxes, one of which must be checked?

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.

Detect if placeholder text is still exists
3 participants