The Wayback Machine - https://web.archive.org/web/20201020233753/https://github.com/github-tools/github-release-notes/issues/188
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

Pull requests are not included when using "--data-source=milestones" #188

Open
rkeene opened this issue Sep 28, 2018 · 4 comments
Open

Pull requests are not included when using "--data-source=milestones" #188

rkeene opened this issue Sep 28, 2018 · 4 comments

Comments

@rkeene
Copy link

@rkeene rkeene commented Sep 28, 2018

In github-releases-notes v0.16.0, when using --data-source=milestones with "gren changelog --generate", only the issues closed by that milestone are included.

Sample GitHub.com repository milestone: https://github.com/nanocurrency/raiblocks/milestone/11?closed=1

Command: gren changelog --generate --username nanocurrency --repo raiblocks --tags V16.1 --changelog-filename ./CHANGELOG.md --override --milestone-match '{{tag_name}}' --ignore-tags-with="RC,^VERSION" --data-source milestones`

Actual Output:

# Changelog

## V16.1 (26/09/2018)
- [**bug**] Mutex deadlock [#1235](https://github.com/nanocurrency/raiblocks/issues/1235)
- [**bug**] Outbound Usage [#1214](https://github.com/nanocurrency/raiblocks/issues/1214)
- [**bug**] Increase stack size for Windows builds [#1212](https://github.com/nanocurrency/raiblocks/issues/1212)
- [**bug**] Rai node very slow sync since v15 [#1204](https://github.com/nanocurrency/raiblocks/issues/1204)

Expected output:
In addition to the 4 issues, all the merged in pull requests should be included

@alexcanessa
Copy link
Member

@alexcanessa alexcanessa commented Sep 28, 2018

Hello, this was by design actually, as I never thought that you could add PRs to milestones.

The filtering happens here (line: 828):

/**
* Filter the issue based on gren options and labels
*
* @since 0.9.0
* @private
*
* @param {Object} issue
*
* @return {Boolean}
*/
_filterIssue(issue) {
const { dataSource } = this.options;
return (issue.pull_request ? dataSource === 'prs' : dataSource === 'issues' | dataSource === 'milestones') && !this._lablesAreIgnored(issue.labels) &&
!((this.options.onlyMilestones || dataSource === 'milestones') && !issue.milestone);
}

@alexcanessa alexcanessa added the bug label Sep 28, 2018
@rinaldym
Copy link

@rinaldym rinaldym commented Dec 20, 2019

Hi @alexcanessa any plans to release an update for this? I've tried messing with the filter but it seems to append all the tags for the specific issue to the release notes even though it does successfully pull the pull requests.

@alexcanessa
Copy link
Member

@alexcanessa alexcanessa commented Dec 23, 2019

@rinaldym I should be able to make this feature over Christmas. But you're welcome to work on it if you want :)

@dlsrb6342
Copy link

@dlsrb6342 dlsrb6342 commented Jan 8, 2020

--data-source milestones-with-prs would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.