-
Notifications
You must be signed in to change notification settings - Fork 25
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
✨ Add check for comments in PR description #10
Conversation
Welcome @paranoidsp! |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: paranoidsp The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There do not currently seem to be any tests for the PRPlugins in the verify runner, please let me know if you'd like me to add some based on the tests in the notes package. |
/assign @DirectXMan12 Please review whenever you get a chance. |
@@ -87,6 +87,10 @@ func main() { | |||
errs = append(errs, "**Your PR has an issue number in the title.**\n\nThe title should just be descriptive.\nIssue numbers belong in the PR body as either `Fixes #XYZ` (if it closes the issue or PR), or something like `Related to #XYZ` (if it's just related).") | |||
} | |||
|
|||
if regexp.MustCompile(`(?s)<!--.*?-->`).MatchString(pr.GetBody()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this'll get comments inside code blocks, and other stuff too. At the very least we need to check https://github.com/russross/blackfriday/blob/v2.0.1/html.go#L68.
The "more correct" solution is probably to parse the markdown with blackfriday & look for html nodes that are comment nodes, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for the "more correct" solution
(sorry for the delay in review) |
Should this be implemented as a new |
@@ -87,6 +87,10 @@ func main() { | |||
errs = append(errs, "**Your PR has an issue number in the title.**\n\nThe title should just be descriptive.\nIssue numbers belong in the PR body as either `Fixes #XYZ` (if it closes the issue or PR), or something like `Related to #XYZ` (if it's just related).") | |||
} | |||
|
|||
if regexp.MustCompile(`(?s)<!--.*?-->`).MatchString(pr.GetBody()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for the "more correct" solution
Yeah, esp if it's gonna be more complex |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
@paranoidsp: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This adds a check for comments in the PR description.
Fixes #5.