Copyright 2018 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// listpullreqs.go lists pull requests since the last release.
packagemain
import(
"context"
"fmt"
"github.com/google/go-github/github"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/oauth2"
)
var(
tokenstring
fromTagstring
toTagstring
)
varrootCmd=&cobra.Command{
Use:"listpullreqs fromTag toTag",
Short:"Lists pull requests between two versions in our changelog markdown format",
ArgAliases:[]string{"fromTag","toTag"},
Run:func(cmd*cobra.Command,args[]string){
printPullRequests()
},
}
constorg="kubernetes"
constrepo="minikube"
funcmain(){
rootCmd.Flags().StringVar(&token,"token","","Specify personal Github Token if you are hitting a rate limit anonymously. https://github.com/settings/tokens")
rootCmd.Flags().StringVar(&fromTag,"fromTag","","comparison of commits is based on this tag (defaults to the latest tag in the repo)")
rootCmd.Flags().StringVar(&toTag,"toTag","master","this is the commit that is compared with fromTag")