Go client for the Drone API
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
liuzhiguo 71469334e4 更改包名 6 months ago
drone include token in extension request 2 years ago
plugin 更改包名 6 months ago
.drone.yml Add a vet step to drone config 4 years ago
.github_changelog_generator (maint) release_v1.7.0 prep (#67) 3 years ago
.golangci.yml (DRON-124) add Incomplete V2 (#65) 3 years ago
CHANGELOG.md 更改包名 6 months ago
LICENSE Initial commit 9 years ago
NOTICE add NOTICE [CI SKIP] 5 years ago
README.md 更改包名 6 months ago
go.mod 更改包名 6 months ago
go.sum option to return ErrSkip and ErrBlock from validator 4 years ago

README.md

drone-go

Go.dev

package main

import (
	"fmt"

	"git.awesome-for.me/liuzhiguo/drone-go/drone"
	"golang.org/x/oauth2"
)

const (
	token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
	host  = "http://drone.company.com"
)

func main() {
	// create an http client with oauth authentication.
	config := new(oauth2.Config)
	auther := config.Client(
		oauth2.NoContext,
		&oauth2.Token{
			AccessToken: token,
		},
	)

	// create the drone client with authenticator
	client := drone.NewClient(host, auther)

	// gets the current user
	user, err := client.Self()
	fmt.Println(user, err)

	// gets the named repository information
	repo, err := client.Repo("drone", "drone-go")
	fmt.Println(repo, err)
}

Release procedure

Run the changelog generator.

docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone -p drone-go -t <secret github token>

You can generate a token by logging into your GitHub account and going to Settings -> Personal access tokens.

Next we tag the PR's with the fixes or enhancements labels. If the PR does not fufil the requirements, do not add a label.

Run the changelog generator again with the future version according to semver.

docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone -p drone-go -t <secret token> --future-release v1.0.0

Create your pull request for the release. Get it merged then tag the release.