@@ -3,9 +3,7 @@ package rcpr
33import (
44 "context"
55 "errors"
6- "flag"
76 "fmt"
8- "io"
97 "log"
108 "net/url"
119 "os"
@@ -20,7 +18,6 @@ import (
2018)
2119
2220const (
23- cmdName = "rcpr"
2421 gitUser = "github-actions[bot]"
2522 gitEmail = "github-actions[bot]@users.noreply.github.com"
2623 defaultReleaseBranch = "main"
@@ -29,11 +26,6 @@ const (
2926 autoLableName = "rcpr"
3027)
3128
32- func printVersion (out io.Writer ) error {
33- _ , err := fmt .Fprintf (out , "%s v%s (rev:%s)\n " , cmdName , version , revision )
34- return err
35- }
36-
3729type rcpr struct {
3830 c * commander
3931 gh * github.Client
@@ -111,28 +103,6 @@ func isRcpr(pr *github.PullRequest) bool {
111103 return false
112104}
113105
114- // Run the rcpr
115- func Run (ctx context.Context , argv []string , outStream , errStream io.Writer ) error {
116- log .SetOutput (errStream )
117- fs := flag .NewFlagSet (
118- fmt .Sprintf ("%s (v%s rev:%s)" , cmdName , version , revision ), flag .ContinueOnError )
119- fs .SetOutput (errStream )
120- ver := fs .Bool ("version" , false , "display version" )
121- if err := fs .Parse (argv ); err != nil {
122- return err
123- }
124- if * ver {
125- return printVersion (outStream )
126- }
127-
128- rp , err := newRcpr (ctx , & commander {
129- gitPath : "git" , outStream : outStream , errStream : errStream , dir : "." })
130- if err != nil {
131- return err
132- }
133- return rp .Run (ctx )
134- }
135-
136106func (rp * rcpr ) Run (ctx context.Context ) error {
137107 latestSemverTag := rp .latestSemverTag ()
138108 currVerStr := latestSemverTag
@@ -426,6 +396,7 @@ func parseGitURL(u string) (*url.URL, error) {
426396}
427397
428398func mergeBody (now , update string ) string {
399+ // TODO: If there are check boxes, respect what is checked, etc.
429400 return update
430401}
431402
0 commit comments