-
Notifications
You must be signed in to change notification settings - Fork 127
Classify/Label PRs That Are Docs Only #1505
Conversation
This pull request introduces 1 alert when merging 7d9af8c into fe79383 - view on LGTM.com new alerts:
|
Codecov Report
@@ Coverage Diff @@
## master #1505 +/- ##
==========================================
+ Coverage 59.60% 60.33% +0.73%
==========================================
Files 55 56 +1
Lines 8250 8447 +197
==========================================
+ Hits 4917 5096 +179
- Misses 3333 3351 +18 |
Thanks for working on this. I was a bit confused at first because the description mentions adding I haven't looked at the code at detail yet, just quicky skimmed through
Maybe use
I am not sure. Why ignore those?
Anything that is in galaxy should be auto-closed anyway so we don't have to take them into account.
Yes, please. |
@mkrizek, thanks for the review. Your suggestions (along with LGTM's) did highlight that I should've polished a little more before submitting. Some of those are left-over after munging my standalone prototype into ansibullbot.
I agree that
My thinking was that most of Ansible's documented API is class based, making module-level functions a rarity for the docs. However, Ansible is a large project, so this could entirely be false; especially for edge cases. It wouldn't take much to add them. Would just need to rearrange the data structure and add another conditional.
After codecov ran, I figured that would be the case. 😄 |
Thanks @sommersoft for a detailed PR! This sent me back to look at the labels more generally. We have three "docs-related" labels: If I'm reading this PR correctly, it would use |
As it is now, this PR will only apply
As @mkrizek pointed out and I agree with, a new
Certainly. |
|
||
import requests | ||
|
||
RE_DOCS_PATTERNS = [ |
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.
@acozine Should we include lib/ansible/plugins/doc_fragments/
as well?
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.
Also, if bot determines that a PR is docs_only
and only other changes in addition to docs only are in changelogs/fragments
, we might add the label anyway?
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.
Thanks for adding the tests @sommersoft!
Overall it looks good. I added comments but most of them are just suggestions, there are a few that need to be addressed though.
…n't reuse the class vars with fixtures/parametrized
I've updated to using I apologize for adding to the review workload on this! |
This pull request introduces 1 alert when merging a17d72b into f725f6c - view on LGTM.com new alerts:
|
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.
Thanks!
@sommersoft I see there is |
I don't have anything else. Still awaiting an answer from acozine on your question of additional exclusions, but I don't think that should necessarily hold this up. |
This is an approach to address #1047.
Working with the currently available labels in ansible/ansible:
docsite
docs_only
label to PRs if ALL changes are limited to "docs only" logic.docsite
docs_only
label if there are changes outside of "docs only", unless the label was applied by a human.I couldn't determine with any certainty how ansibullbot adds the
docsite
label (viautils/component_tools.py
, etc.); it seemed mostly random looking at various PRs and the component matching routines.This is written quite narrowly at the moment, but could possibly be expanded for use in other issues (notification, standards enforcement, etc).
Very small sample set (PRs are now merged):
The attached logfile contains more examples (50 open PRs at time of running).
log_new_docsite.txt
Open questions:
How are Galaxy components affected? I didn't see any activity from this addition when running my tests with Galaxy included, but I'm not certain there are no effects.Is a test desired for this?get_docs_facts
.Isdocsite
the appropriate label to assign, or should a new label be created onansible/ansible
?docs_only
label created, and will be used.