-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
pkg/oc/cli/admin/release: Issues from non-first-parent commits #22185
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wking If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
3e5ddbf
to
1c9eba8
Compare
1c9eba8
to
cd8325b
Compare
Sometimes a single pull request will address multiple issues, and listing them all in a PR subject is not feasible. With this commit, I iterate over all commits in the given range (merge or not), but only return a slice for the first-parent chain (which in most cases will be a series of merges to master). For commits that are part of the retrieved graph but which lie outside the first-parent chain, I find the nearest first-parent ancestor and attach any referenced issues to that ancestor. The new 'issue' structure sets the stage for future work to also support references to GitHub and other issue stores, although I haven't added extractors for those yet. Ordinarily I'd use github.com/pkg/errors for the New() and Errorf() calls, but for some reason that's forbidden [1]: 2019/02/28 02:21:57 Inspecting imports under github.com/openshift/origin/pkg/oc... 2019/02/28 02:21:59 -- validating imports for 129 packages in the tree 2019/02/28 02:21:59 -- found forbidden imports for github.com/openshift/origin/pkg/oc/cli/admin/release: 2019/02/28 02:21:59 vendor/github.com/pkg/errors [1]: https://storage.googleapis.com/origin-ci-test/pr-logs/pull/22185/pull-ci-openshift-origin-master-verify/3302/build-log.txt
cd8325b
to
59e763e
Compare
I was not expecting that :p. Anyhow, dropped back to the stdlib's |
/hold This is more of a discussion about how we want to do changelogs. We have very specific requirements in our release system around bugs and their linkage to code. In general, changelog doesn't exist to satisfy arbitrary git styles, but to satisfy the specific style we will use to fill out release advisories. It isn't about displaying commit messages or even PRs (PRs are tolerated for now). It's about displaying bug fixes. So if we were to do something along supporting multiple we would do it for |
I think only extracting these from our pull-request titles is going to make for unnecessarily-long pull-request titles. I want to write pull-request titles aimed at the repo's maintainers, for whom the link into Bugzilla is probably not top-billing information. With this commit, I can add the |
I agree with Trevor here, I prefer a series of commits, each fixing one bug as the best possible approach. Commits better reflect history than PRs, I frequently filter out merge commits. |
FWIW, I think sometimes even a single commit scoped as narrowly as possible can fix more than one bug. I think assuming a commit per bug is too rigid. |
I've filed #22225 for this.
Nothing assumes a commit per bug. This PR just allows a commit per bug to be documented via the individual commit subjects instead of rolled up in the PR title (although you can still roll up in the PR title if you want). And with #22186 and/or #22225 and this PR, we'd also allow each of those commits to address multiple bugs. Personally, I'm in favor of landing all three PRs. |
@wking: 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. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-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. |
Sometimes a single pull request will address multiple issues, and listing them all in a PR subject is not feasible. With this commit, I iterate over all commits in the given range (merge or not), but only return a slice for the first-parent chain (which in most cases will be a series of merges to master). For commits that are part of the retrieved graph but which lie outside the first-parent chain, I find the nearest first-parent ancestor and attach any referenced issues to that ancestor. The new
issue
structure sets the stage for future work to also support references to GitHub and other issue stores, although I haven't added extractors for those yet (I'm planning on usinggit interpret-trailers
).CC @smarterclayton, @mfojtik, @soltysh, since this is following up on #22030.