Fix various typos
This commit is contained in:
parent
ef168cd2a4
commit
c7e03b6251
35 changed files with 61 additions and 61 deletions
|
@ -94,13 +94,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- page to view the latest build per branch.
|
||||
|
||||
### Fixed
|
||||
- sync routine not executing asyncronously, being cancelled by http context.
|
||||
- sync routine not executing asynchronously, being cancelled by http context.
|
||||
- sync routine should ignore gitlab subrepositories
|
||||
- convert deploy events in 0.8 yaml to promote events.
|
||||
- do not execute cron job for disabled repositories. [#2931](https://github.com/drone/drone/issues/2931).
|
||||
- remove trailing slash from gitea url to prevent oauth2 token refresh errors, by [@cmj0121](https://github.com/cmj0121). [#2920](https://github.com/drone/drone/issues/2920).
|
||||
- disable font ligatures in build log output. [drone/drone-ui#322](https://github.com/drone/drone-ui/pull/322).
|
||||
- missing am/pm in timstamps
|
||||
- missing am/pm in timestamps
|
||||
|
||||
## [1.6.5] - 2020-01-29
|
||||
### Changed
|
||||
|
|
|
@ -77,7 +77,7 @@ type BuildStore interface {
|
|||
LatestBranches(context.Context, int64) ([]*Build, error)
|
||||
|
||||
// LatestPulls returns the latest builds from the
|
||||
// datastore by pull requeset.
|
||||
// datastore by pull request.
|
||||
LatestPulls(context.Context, int64) ([]*Build, error)
|
||||
|
||||
// LatestDeploys returns the latest builds from the
|
||||
|
|
|
@ -16,7 +16,7 @@ package core
|
|||
|
||||
import "context"
|
||||
|
||||
// Transferer handles transfering repository ownership from one
|
||||
// Transferer handles transferring repository ownership from one
|
||||
// user to another user account.
|
||||
type Transferer interface {
|
||||
Transfer(ctx context.Context, user *User) error
|
||||
|
|
|
@ -101,7 +101,7 @@ type (
|
|||
}
|
||||
)
|
||||
|
||||
// Validate valides the user and returns an error if the
|
||||
// Validate validates the user and returns an error if the
|
||||
// validation fails.
|
||||
func (u *User) Validate() error {
|
||||
switch {
|
||||
|
|
|
@ -25,7 +25,7 @@ func init() {
|
|||
logrus.SetOutput(ioutil.Discard)
|
||||
}
|
||||
|
||||
func TestResitoryList(t *testing.T) {
|
||||
func TestRepositoryList(t *testing.T) {
|
||||
controller := gomock.NewController(t)
|
||||
defer controller.Finish()
|
||||
|
||||
|
@ -63,7 +63,7 @@ func TestResitoryList(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestResitoryListErr(t *testing.T) {
|
||||
func TestRepositoryListErr(t *testing.T) {
|
||||
controller := gomock.NewController(t)
|
||||
defer controller.Finish()
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ func HandleSync(syncer core.Syncer, repos core.RepositoryStore) http.HandlerFunc
|
|||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
viewer, _ := request.UserFrom(r.Context())
|
||||
|
||||
// performs asyncrhonous account synchronization.
|
||||
// performs asynchronous account synchronization.
|
||||
// this requires long polling to determine when the
|
||||
// sync is complete.
|
||||
if r.FormValue("async") == "true" {
|
||||
|
@ -57,7 +57,7 @@ func HandleSync(syncer core.Syncer, repos core.RepositoryStore) http.HandlerFunc
|
|||
if err != nil {
|
||||
render.InternalError(w, err)
|
||||
logger.FromRequest(r).WithError(err).
|
||||
Warnln("api: cannot synchrnoize account")
|
||||
Warnln("api: cannot synchronize account")
|
||||
} else {
|
||||
render.JSON(w, list, 200)
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ func HandleCreate(users core.UserStore, service core.UserService, sender core.We
|
|||
if err != nil {
|
||||
render.ErrorCode(w, err, 400)
|
||||
logger.FromRequest(r).WithError(err).
|
||||
Errorln("api: invlid username")
|
||||
Errorln("api: invalid username")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ func TestCreate(t *testing.T) {
|
|||
t.Errorf("Want user login %s, got %s", want, got)
|
||||
}
|
||||
if in.Hash == "" {
|
||||
t.Errorf("Expect user secert generated")
|
||||
t.Errorf("Expect user secret generated")
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
|
|
@ -35,7 +35,7 @@ func HandleFind(users core.UserStore) http.HandlerFunc {
|
|||
if err != nil {
|
||||
// the client can make a user request by providing
|
||||
// the user id as opposed to the username. If a
|
||||
// numberic user id is provided as input, attempt
|
||||
// numeric user id is provided as input, attempt
|
||||
// to lookup the user by id.
|
||||
if id, _ := strconv.ParseInt(login, 10, 64); id != 0 {
|
||||
user, err = users.Find(r.Context(), id)
|
||||
|
|
|
@ -150,7 +150,7 @@ func HandleLogin(
|
|||
}
|
||||
|
||||
// If the user account has never been synchronized we
|
||||
// execute the synchonrization logic.
|
||||
// execute the synchronization logic.
|
||||
if time.Unix(user.Synced, 0).Add(syncPeriod).Before(time.Now()) {
|
||||
user.Syncing = true
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ func HandleLogin(
|
|||
logger.Errorf("cannot update user: %s", err)
|
||||
}
|
||||
|
||||
// launch the synchrnoization process in a go-routine,
|
||||
// launch the synchronization process in a go-routine,
|
||||
// since it is a long-running process and can take up
|
||||
// to a few minutes.
|
||||
if user.Syncing {
|
||||
|
|
|
@ -44,7 +44,7 @@ type (
|
|||
System *core.System `json:"system"`
|
||||
}
|
||||
|
||||
// BuildManager encapsulets complex build operations and provides
|
||||
// BuildManager encapsulates complex build operations and provides
|
||||
// a simplified interface for build runners.
|
||||
BuildManager interface {
|
||||
// Request requests the next available build stage for execution.
|
||||
|
@ -60,13 +60,13 @@ type (
|
|||
Details(ctx context.Context, stage int64) (*Context, error)
|
||||
|
||||
// Before signals the build step is about to start.
|
||||
Before(ctxt context.Context, step *core.Step) error
|
||||
Before(ctx context.Context, step *core.Step) error
|
||||
|
||||
// After signals the build step is complete.
|
||||
After(ctx context.Context, step *core.Step) error
|
||||
|
||||
// Before signals the build stage is about to start.
|
||||
BeforeAll(ctxt context.Context, stage *core.Stage) error
|
||||
BeforeAll(ctx context.Context, stage *core.Stage) error
|
||||
|
||||
// After signals the build stage is complete.
|
||||
AfterAll(ctx context.Context, stage *core.Stage) error
|
||||
|
@ -84,7 +84,7 @@ type (
|
|||
UploadBytes(ctx context.Context, step int64, b []byte) error
|
||||
}
|
||||
|
||||
// Request provildes filters when requesting a pending
|
||||
// Request provides filters when requesting a pending
|
||||
// build from the queue. This allows an agent, for example,
|
||||
// to request a build that matches its architecture and kernel.
|
||||
Request struct {
|
||||
|
|
|
@ -58,7 +58,7 @@ func (Server) Details(ctx context.Context, stage int64) (*manager.Context, error
|
|||
}
|
||||
|
||||
// Before signals the build step is about to start.
|
||||
func (Server) Before(ctxt context.Context, step *core.Step) error {
|
||||
func (Server) Before(ctx context.Context, step *core.Step) error {
|
||||
return errors.New("not implemented")
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ func (Server) After(ctx context.Context, step *core.Step) error {
|
|||
}
|
||||
|
||||
// Before signals the build stage is about to start.
|
||||
func (Server) BeforeAll(ctxt context.Context, stage *core.Stage) error {
|
||||
func (Server) BeforeAll(ctx context.Context, stage *core.Stage) error {
|
||||
return errors.New("not implemented")
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ func HandlePing() http.HandlerFunc {
|
|||
}
|
||||
|
||||
// HandleRequest returns an http.HandlerFunc that processes an
|
||||
// http.Request to reqeust a stage from the queue for execution.
|
||||
// http.Request to request a stage from the queue for execution.
|
||||
//
|
||||
// POST /rpc/v2/stage
|
||||
func HandleRequest(m manager.BuildManager) http.HandlerFunc {
|
||||
|
@ -135,7 +135,7 @@ func HandleInfo(m manager.BuildManager) http.HandlerFunc {
|
|||
writeJSON(w, &details{
|
||||
Context: res,
|
||||
Netrc: netrc,
|
||||
Repo: &repositroy{
|
||||
Repo: &repository{
|
||||
Repository: res.Repo,
|
||||
Secret: res.Repo.Secret,
|
||||
},
|
||||
|
|
|
@ -16,12 +16,12 @@ import (
|
|||
type details struct {
|
||||
*manager.Context
|
||||
Netrc *core.Netrc `json:"netrc"`
|
||||
Repo *repositroy `json:"repository"`
|
||||
Repo *repository `json:"repository"`
|
||||
}
|
||||
|
||||
// repository wraps a repository object to include the secret
|
||||
// when the repository is marshaled to json.
|
||||
type repositroy struct {
|
||||
type repository struct {
|
||||
*core.Repository
|
||||
Secret string `json:"secret"`
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ type Config struct {
|
|||
}
|
||||
}
|
||||
|
||||
// heper function reads and unmarshales the docker-machine
|
||||
// helper function reads and unmarshalls the docker-machine
|
||||
// configuration from a reader.
|
||||
func parseReader(r io.Reader) (*Config, error) {
|
||||
out := new(Config)
|
||||
|
|
|
@ -37,7 +37,7 @@ func Load(home, match string) ([]*Config, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// If no match logic is defined, the matchine is
|
||||
// If no match logic is defined, the machine is
|
||||
// automatically used as a build machine.
|
||||
if match == "" {
|
||||
machines = append(machines, conf)
|
||||
|
|
|
@ -71,7 +71,7 @@ func TestGlobalErr(t *testing.T) {
|
|||
false, time.Minute)
|
||||
_, err := service.Find(noContext, args)
|
||||
if err == nil {
|
||||
t.Errorf("Expect http.Reponse error")
|
||||
t.Errorf("Expect http.Response error")
|
||||
} else if err.Error() != "Not Found" {
|
||||
t.Errorf("Expect Not Found error")
|
||||
}
|
||||
|
|
|
@ -17,13 +17,13 @@ func Parse(req *core.ConvertArgs, template *core.Template, templateData map[stri
|
|||
vm.ErrorFormatter.SetMaxStackTraceSize(20)
|
||||
|
||||
var jsonnetFile string
|
||||
var jsonentFileName string
|
||||
var jsonnetFileName string
|
||||
if template != nil {
|
||||
jsonnetFile = template.Data
|
||||
jsonentFileName = template.Name
|
||||
jsonnetFileName = template.Name
|
||||
} else {
|
||||
jsonnetFile = req.Config.Data
|
||||
jsonentFileName = req.Repo.Config
|
||||
jsonnetFileName = req.Repo.Config
|
||||
}
|
||||
// map external inputs
|
||||
if len(templateData) != 0 {
|
||||
|
@ -35,9 +35,9 @@ func Parse(req *core.ConvertArgs, template *core.Template, templateData map[stri
|
|||
}
|
||||
// convert the jsonnet file to yaml
|
||||
buf := new(bytes.Buffer)
|
||||
docs, err := vm.EvaluateSnippetStream(jsonentFileName, jsonnetFile)
|
||||
docs, err := vm.EvaluateSnippetStream(jsonnetFileName, jsonnetFile)
|
||||
if err != nil {
|
||||
doc, err2 := vm.EvaluateSnippet(jsonentFileName, jsonnetFile)
|
||||
doc, err2 := vm.EvaluateSnippet(jsonnetFileName, jsonnetFile)
|
||||
if err2 != nil {
|
||||
return "", err
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import (
|
|||
)
|
||||
|
||||
// Encrypted returns a new encrypted registry credentials
|
||||
// provider that sournces credentials from the encrypted strings
|
||||
// provider that sources credentials from the encrypted strings
|
||||
// in the yaml file.
|
||||
func Encrypted() core.RegistryService {
|
||||
return new(encrypted)
|
||||
|
|
|
@ -67,7 +67,7 @@ func TestEndpointSource_Err(t *testing.T) {
|
|||
service := EndpointSource("https://company.com/auths", "GMEuUHQfmrMRsseWxi9YlIeBtn9lm6im", false)
|
||||
_, err := service.List(noContext, &core.RegistryArgs{Repo: &core.Repository{}, Build: &core.Build{}})
|
||||
if err == nil {
|
||||
t.Errorf("Expect http.Reponse error")
|
||||
t.Errorf("Expect http.Response error")
|
||||
} else if err.Error() != "Not Found" {
|
||||
t.Errorf("Expect Not Found error")
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ func (q *queue) signal(ctx context.Context) error {
|
|||
continue
|
||||
}
|
||||
|
||||
// if the system defines concurrencly limits
|
||||
// if the system defines concurrency limits
|
||||
// per repository we need to make sure those limits
|
||||
// are not exceeded before proceeding.
|
||||
if shouldThrottle(item, items, item.LimitRepo) == true {
|
||||
|
@ -275,7 +275,7 @@ func withinLimits(stage *core.Stage, siblings []*core.Stage) bool {
|
|||
}
|
||||
|
||||
func shouldThrottle(stage *core.Stage, siblings []*core.Stage, limit int) bool {
|
||||
// if no throttle limit is defined (defualt) then
|
||||
// if no throttle limit is defined (default) then
|
||||
// return false to indicate no throttling is needed.
|
||||
if limit == 0 {
|
||||
return false
|
||||
|
|
|
@ -148,7 +148,7 @@ func TestMatchResource(t *testing.T) {
|
|||
for i, test := range tests {
|
||||
got, want := matchResource(test.kinda, test.typea, test.kindb, test.typeb), test.want
|
||||
if got != want {
|
||||
t.Errorf("Unexpectd results at index %d", i)
|
||||
t.Errorf("Unexpected results at index %d", i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ func TestShouldThrottle(t *testing.T) {
|
|||
for i, test := range tests {
|
||||
stage := stages[i]
|
||||
if got, want := shouldThrottle(stage, stages, stage.LimitRepo), test.Want; got != want {
|
||||
t.Errorf("Unexpectd results at index %d", i)
|
||||
t.Errorf("Unexpected results at index %d", i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ func TestWithinLimits(t *testing.T) {
|
|||
},
|
||||
|
||||
// stage with concurrency 1, no existing stages
|
||||
// exist for same repositroy id. expect true.
|
||||
// exist for same repository id. expect true.
|
||||
{
|
||||
result: true,
|
||||
stage: &core.Stage{
|
||||
|
@ -316,7 +316,7 @@ func TestWithinLimits(t *testing.T) {
|
|||
|
||||
for i, test := range tests {
|
||||
if got, want := withinLimits(test.stage, test.stages), test.result; got != want {
|
||||
t.Errorf("Unexpectd results at index %d", i)
|
||||
t.Errorf("Unexpected results at index %d", i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ func TestWithinLimits_Old(t *testing.T) {
|
|||
for i, test := range tests {
|
||||
stage := stages[i]
|
||||
if got, want := withinLimits(stage, stages), test.Want; got != want {
|
||||
t.Errorf("Unexpectd results at index %d", i)
|
||||
t.Errorf("Unexpected results at index %d", i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ type service struct {
|
|||
func (s *service) Find(ctx context.Context, user *core.User, repo, commit, ref, path string) (*core.File, error) {
|
||||
// TODO(gogs) ability to fetch a yaml by pull request ref.
|
||||
// it is not currently possible to fetch the yaml
|
||||
// configuation file from a pull request sha. This
|
||||
// configuration file from a pull request sha. This
|
||||
// workaround defaults to master.
|
||||
if s.client.Driver == scm.DriverGogs &&
|
||||
strings.HasPrefix(ref, "refs/pull") {
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
"github.com/drone/go-scm/scm"
|
||||
)
|
||||
|
||||
// merge is a helper function that mergest a subset of
|
||||
// merge is a helper function that merges a subset of
|
||||
// values from the source to the destination repository.
|
||||
func merge(dst, src *core.Repository) {
|
||||
dst.Namespace = src.Namespace
|
||||
|
|
|
@ -45,7 +45,7 @@ func TestGet_Token_QueryParam(t *testing.T) {
|
|||
}
|
||||
|
||||
// This test verifies that a user is returned when a valid
|
||||
// authorization token included in the Authorzation header.
|
||||
// authorization token included in the Authorization header.
|
||||
func TestGet_Token_Header(t *testing.T) {
|
||||
controller := gomock.NewController(t)
|
||||
defer controller.Finish()
|
||||
|
|
|
@ -298,7 +298,7 @@ SELECT
|
|||
,repo_secret
|
||||
`
|
||||
|
||||
const queryColsBulds = queryCols + `
|
||||
const queryColsBuilds = queryCols + `
|
||||
,build_id
|
||||
,build_repo_id
|
||||
,build_trigger
|
||||
|
@ -488,7 +488,7 @@ WHERE repo_id = :repo_id
|
|||
// INNER JOIN perms ON perms.perm_repo_uid = repos.repo_uid
|
||||
//
|
||||
|
||||
const queryRepoWithBuild = queryColsBulds + `
|
||||
const queryRepoWithBuild = queryColsBuilds + `
|
||||
FROM repos LEFT OUTER JOIN builds ON build_id = (
|
||||
SELECT build_id FROM builds
|
||||
WHERE builds.build_repo_id = repos.repo_id
|
||||
|
@ -500,7 +500,7 @@ WHERE perms.perm_user_id = :user_id
|
|||
ORDER BY repo_slug ASC
|
||||
`
|
||||
|
||||
const queryRepoWithBuildPostgres = queryColsBulds + `
|
||||
const queryRepoWithBuildPostgres = queryColsBuilds + `
|
||||
FROM repos LEFT OUTER JOIN builds ON build_id = (
|
||||
SELECT DISTINCT ON (build_repo_id) build_id FROM builds
|
||||
WHERE builds.build_repo_id = repos.repo_id
|
||||
|
@ -511,7 +511,7 @@ WHERE perms.perm_user_id = :user_id
|
|||
ORDER BY repo_slug ASC
|
||||
`
|
||||
|
||||
const queryRepoWithBuildAll = queryColsBulds + `
|
||||
const queryRepoWithBuildAll = queryColsBuilds + `
|
||||
FROM repos
|
||||
INNER JOIN perms ON perms.perm_repo_uid = repos.repo_uid
|
||||
INNER JOIN builds ON builds.build_repo_id = repos.repo_id
|
||||
|
@ -520,7 +520,7 @@ ORDER BY build_id DESC
|
|||
LIMIT 25;
|
||||
`
|
||||
|
||||
const queryRepoWithBuildIncomplete = queryColsBulds + `
|
||||
const queryRepoWithBuildIncomplete = queryColsBuilds + `
|
||||
FROM repos
|
||||
INNER JOIN builds ON builds.build_repo_id = repos.repo_id
|
||||
WHERE EXISTS (
|
||||
|
|
|
@ -70,7 +70,7 @@ func pingDatabase(db *sql.DB) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
// helper function to setup the databsae by performing automated
|
||||
// helper function to setup the database by performing automated
|
||||
// database migration steps.
|
||||
func setupDatabase(db *sql.DB, driver string) error {
|
||||
switch driver {
|
||||
|
|
|
@ -21,8 +21,8 @@ import (
|
|||
"io"
|
||||
)
|
||||
|
||||
// Aesgcm provides an encryper that uses the aesgcm encryption
|
||||
// alogirthm.
|
||||
// Aesgcm provides an encrypter that uses the aesgcm encryption
|
||||
// algorithm.
|
||||
type Aesgcm struct {
|
||||
block cipher.Block
|
||||
Compat bool
|
||||
|
@ -56,7 +56,7 @@ func (e *Aesgcm) Decrypt(ciphertext []byte) (string, error) {
|
|||
// mode, it will return the ciphertext as plain text if
|
||||
// decryption fails. This should be used when running the
|
||||
// database in mixed-mode, where there is a mix of encrypted
|
||||
// and unecrypted content.
|
||||
// and unencrypted content.
|
||||
if e.Compat {
|
||||
return string(ciphertext), nil
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ func (e *Aesgcm) Decrypt(ciphertext []byte) (string, error) {
|
|||
// mode, it will return the ciphertext as plain text if
|
||||
// decryption fails. This should be used when running the
|
||||
// database in mixed-mode, where there is a mix of encrypted
|
||||
// and unecrypted content.
|
||||
// and unencrypted content.
|
||||
if err != nil && e.Compat {
|
||||
return string(ciphertext), nil
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ func TestAncestors(t *testing.T) {
|
|||
}
|
||||
|
||||
if v := dag.Ancestors("backend"); len(v) != 0 {
|
||||
t.Errorf("Expect vertexes with no dependences has zero ancestors")
|
||||
t.Errorf("Expect vertexes with no dependencies has zero ancestors")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ func skipMessageEval(str string) bool {
|
|||
// case len(paths) == 0:
|
||||
// return false
|
||||
// // github returns a maximum of 300 changed files from the
|
||||
// // api response. If there are 300+ chagned files the system
|
||||
// // api response. If there are 300+ changed files the system
|
||||
// // will force-run all pipelines and pipeline steps.
|
||||
// case len(paths) >= 300:
|
||||
// return false
|
||||
|
|
Loading…
Reference in a new issue