add dump-issues subparser#9
Conversation
|
Shouldn't the bugs in the release notes not just be "highlighted" bugs? |
|
The script is a bit systematic indeed, since all issues labelled with I have no idea which bug should be highlighted and others not. At least, here we are transparent about the issues we have. Maybe a bit of cleanup could be done between all of them? |
|
I think this really helps, I was able to use it pretty easy. Even if some manual work is needed it still helps. Should we try to get it in? |
Maybe some keyword that is added by this subroutine and then checked by the final release subroutine could be added, so lazy release managers don't accidentally release the issue list unchecked could be beneficial? |
|
I think this PR has proved that it was useful. Do we agree to merge it ? (I can squash if someone agrees). |
b12f81d to
d60ba9a
Compare
|
Sorry, I messed with my rebase, so I squash all commits into one. Hope this is fine. Tested again locally and still working as before. |
|
I'm fine with the PR is it is @kb2ma I leave it to you to test :-). |
kb2ma
left a comment
There was a problem hiding this comment.
Thanks for this PR, @aabadie! I ran it once, and it basically looks OK. I will look more closely at the content to be sure.
It definitely needs an addition to README.rst like the other commands, to describe what it is and how to use it.
|
@kb2ma, I added an entry in the README for dump-issues and fixed the typo you reported in the function. |
kb2ma
left a comment
There was a problem hiding this comment.
I like how the code builds known_issues to ultimately print the list of uncategorized issues. A couple of comments to make this explicit will make it easier for a future reader to quickly understand how it works.
|
|
||
|
|
||
| def print_open_issues(repo, msg, labels=None, known_issues=None): | ||
| """Retrieve and print all open issues.""" |
There was a problem hiding this comment.
Please add to this comment that the input list of known_issues is updated and returned.
| minor_label = repo.get_label('Impact: minor') | ||
| excluded_issues = get_issues(repo, 'open', labels=[minor_label]) | ||
|
|
||
| # Network related issues |
There was a problem hiding this comment.
Please add a short summary of how this works. The list of known_issues is incrementally updated with each call to print_open_issues until finally only open issues not yet printed are included with "other issues".
|
I have looked in detail at the code now, and asked for a couple of changes. It all works AFAICT, which is the most important thing. :-) Aside from that, see the suggestions below for follow-up work. I definitely would move the issue code from this PR to a separate module (python file). It logically covers a separate topic from the rest of Print the number of issues found on a separate line at the end of Right justify the issue numbers so they all line up. Some have 5 digits and some have 4. |
I disagree with this. This script is here to help the release manager when using git and github: it creates the release specs issues, creates the tags/branches, publish the release. To do this, it requires access to the github API (with API tokens, url, everything). Extending the existing module is perfectly fine IMHO. This is what this PR is doing.
I pushed a fixup commit that changes this like you suggest.
Done. Also added the number of open issues per section and the number of closed issues since last release.
Doable but note that each line is printed as it comes out from the GitHub API. That would need some extra processing to know how to justify the issue number. Is this required ? |
| for issue in gh_issues: | ||
| if issue.pull_request is not None: | ||
| continue | ||
| msg = u"#{}: {}".format(issue.number, issue.title) |
There was a problem hiding this comment.
Right justify the issue numbers so they all line up. Some have 5 digits and some have 4.
Doable but note that each line is printed as it comes out from the GitHub API. That would need some extra processing to know how to justify the issue number. Is this required ?
Here you reformat it yourself, so you can just pre-format the number and then use alignment...
| msg = u"#{}: {}".format(issue.number, issue.title) | |
| msg = u"{:6s}: {}".format("#{}".format(issue.number), issue.title) |
There was a problem hiding this comment.
Thanks! Indeed, it was in the code. Wrote this so long ago...
I agree with @kb2ma here. a) The issue dumper is not as automated as the others (otherwise you could just create a PR from the generated stuff), b) I don't get the argument about the API... Putting the stuff in its separate |
If you think a little further, the whole changelog generation could be automatized. The dump-issues is just a small step toward this. Once done, adding the changelog and creating the PR, etc could be automatized like other stuff.
Sure, but that is enforcing me to also put all github info in a separate module, update the existing module (maybe split this one in more pieces) and create a new module for dump-issues parser. It's not that much but this is extra work and I'm not convinced this is useful now. |
I am sensitive to this myself. I hope my original comment was not confusing. For this PR I was just looking for addition of a couple of comments about how At any rate, I think the change to use the module level I did notice one surprise. Did you intend to repeat the count of fixed issues at the end, since it already is included in the header? |
No this is an undesirable side effect unfortunately. I'd like to remove it from the header (to be consistent with known issues header). |
|
@aabadie, it's been a couple of days, do you plan to make this change to the current PR? If not, I am happy to just approve this because the extra count display is just cosmetic. |
Thanks for the reminder. This is fixed, squashed and pushed. |
|
Good stuff! The latest update works and code makes sense. I leave it to you for any documentation on future improvements. |
Adapted the riot-release-manager script with a
dump-issuessubparser. It dumps all known issues (e.g. with labelType: Bug) classified by main types (network, timers, drivers, etc) and also all closed issues since latest release.The output can be copy-pasted in the release notes file of RIOT. I'm using this to generated the issues list in RIOT-OS/RIOT#10871
Later potential improvements:
etc
Usage
Just call
riot-release-manager dump-issues