Add release-note collector#441
Conversation
| for _, repo := range repoList { | ||
| log.Printf("Start fetching release note from %s", repo) | ||
| queries := createQueryString(repo) | ||
| log.Printf("Query: %s", queries) |
There was a problem hiding this comment.
queries is a slice and I was not sure what is the behavior of %s in this case. Maybe %v?
| order = flag.String("order", "desc", "The sort order if sort parameter is provided. One of asc or desc.") | ||
| version = flag.String("version", "", "Release version") | ||
| output = flag.String("output", "./", "Path to output file") | ||
| startDate = flag.String("start_date", "", "Start date") |
There was a problem hiding this comment.
You might want to use a ref instead of startDate and endDate. Usually we would ask between 0.1.2 and 0.1.3.
|
that's awesome ! are we going to contribute it back to k8s to replace the bash script subscribe |
|
if possible I would do: |
|
This does not publish release notes right ? |
|
It will gather all release-note in PR description and put it into a local file. |
|
Release-note collected from v0.2.0 to now: https://docs.google.com/a/google.com/document/d/1DKDVGihv4ECtxio6RRU1ig8QLzlPZuiGo5PctMbwGYk/edit?usp=sharing |
|
I guess I did not write the right command. I only got 3 notes. |
|
use june 1st as the start date so we get all the 0.2.x notes ? |
|
/retest |
| if err != nil { | ||
| return "", err | ||
|
|
||
| if ty == "tag" { |
There was a problem hiding this comment.
Change here because some tags point to a tag while some point to a commit
GET https://api.github.com/repos/istio/istio/git/refs/tags/0.2.2
{
"ref": "refs/tags/0.2.2",
"url": "https://api.github.com/repos/istio/istio/git/refs/tags/0.2.2",
"object": {
"sha": "9ac006e070b88dba19ad26048c1010675d77e321",
"type": "commit",
"url": "https://api.github.com/repos/istio/istio/git/commits/9ac006e070b88dba19ad26048c1010675d77e321"
}
}GET https://api.github.com/repos/istio/mixer/git/refs/tags/0.2.2
{
"ref": "refs/tags/0.2.2",
"url": "https://api.github.com/repos/istio/mixer/git/refs/tags/0.2.2",
"object": {
"sha": "f146a9ff912337c3d17261140d69801bd6c5789b",
"type": "tag",
"url": "https://api.github.com/repos/istio/mixer/git/tags/f146a9ff912337c3d17261140d69801bd6c5789b"
}
}|
PTAL |
| org = flag.String("user", "istio", "Github owner or org") | ||
| repos = flag.String("repos", "", "Github repos, separate using \",\"") | ||
| label = flag.String("label", "release-note", "Release-note label") | ||
| sort = flag.String("sort", "create", "The sort field. Can be comments, created, or updated.") |
There was a problem hiding this comment.
the default does not match the list. Could you please create const for those.
There was a problem hiding this comment.
type Sort string
const (
CREATED = Sort("created")
COMMENTS = Sort("comments")
)
| repos = flag.String("repos", "", "Github repos, separate using \",\"") | ||
| label = flag.String("label", "release-note", "Release-note label") | ||
| sort = flag.String("sort", "create", "The sort field. Can be comments, created, or updated.") | ||
| order = flag.String("order", "desc", "The sort order if sort parameter is provided. One of asc or desc.") |
There was a problem hiding this comment.
type Order string
const (
DESC = Order("desc")
ASC = Order("asc")
)
|
|
||
| func fetchRelaseNoteFromRepo(repo string, issuesResult *github.IssuesSearchResult) error { | ||
| fileName := filepath.Join(*output, repo+releaseNoteSuffix) | ||
| f, err := os.OpenFile(fileName, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0600) |
There was a problem hiding this comment.
Could you move the file creation outside of this function and just pass an io.Writer instead ? That way we could use one file for all repos.
sebastienvas
left a comment
There was a problem hiding this comment.
Nice. Minor changes. Once we have this committed we should update this page https://github.com/istio/istio/tree/master/release
|
/retest |
3343797 to
95224b0
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ldemailly, sebastienvas The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
/hold |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
why hold ? |
|
/hold cancel |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
/lgtm cancel //PR changed after LGTM, removing LGTM. @ldemailly @sebastienvas @yutongz |
|
@ldemailly For fixing linter |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
Automatic merge from submit-queue. |
Automatic merge from submit-queue Add release-note instruction. **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note none ``` Add instruction about how to get collect release-note from PR description. Should merge after istio/test-infra#441 Former-commit-id: 8c8b8ff
Automatic merge from submit-queue Add release-note instruction. **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note none ``` Add instruction about how to get collect release-note from PR description. Should merge after istio/test-infra#441 Former-commit-id: 8c8b8ff
Automatic merge from submit-queue Add release-note instruction. **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note none ``` Add instruction about how to get collect release-note from PR description. Should merge after istio/test-infra#441 Former-commit-id: 8c8b8ff
Release note:
It's a binary to collect release-note from repos.
Example command:
And the release-note would be put into a local file, default is in current directory, named ".releasenote"
The example output is: