File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ go get github.com/ktrysmt/go-bitbucket
2020
2121## Usage
2222
23+ create a pullrequest
24+
2325``` go
2426package main
2527
@@ -30,7 +32,6 @@ import (
3032)
3133
3234func main () {
33-
3435 c := bitbucket.NewBasicAuth (" username" , " password" )
3536
3637 opt := &bitbucket.PullRequestsOptions {
@@ -51,6 +52,35 @@ func main() {
5152}
5253```
5354
55+ create a repository
56+
57+ ```
58+ package main
59+
60+ import (
61+ "fmt"
62+
63+ "github.com/ktrysmt/go-bitbucket"
64+ )
65+
66+ func main() {
67+ c := bitbucket.NewBasicAuth("username", "password")
68+
69+ opt := &bitbucket.RepositoryOptions{
70+ Owner: "project_name",
71+ RepoSlug: "repo_name",
72+ Scm: "git",
73+ }
74+
75+ res, err := c.Repositories.Repository.Create(opt)
76+ if err != nil {
77+ panic(err)
78+ }
79+
80+ fmt.Println(res)
81+ }
82+ ```
83+
5484## FAQ
5585
5686### Support Bitbucket API v1.0 ?
You can’t perform that action at this time.
0 commit comments