fix some typos

pull/2670/head
徐扬 2019-04-16 11:05:41 +08:00
parent bfc20fc17c
commit 49bbaf4a11
16 changed files with 17 additions and 17 deletions

View File

@ -47,7 +47,7 @@ type (
}
// PermStore defines operations for working with
// repostiory permissions.
// repository permissions.
PermStore interface {
// Find returns a project member from the
// datastore.

View File

@ -23,7 +23,7 @@ type Message struct {
Data []byte
}
// Pubsub provides publish subscriber capablities, distributing
// Pubsub provides publish subscriber capabilities, distributing
// messages from multiple publishers to multiple subscribers.
type Pubsub interface {
// Publish publishes the message to all subscribers.

View File

@ -77,7 +77,7 @@ type (
ListRecent(context.Context, int64) ([]*Repository, error)
// ListIncomplete returns a non-unique repository list form
// the datastore with incmoplete builds.
// the datastore with incomplete builds.
ListIncomplete(context.Context) ([]*Repository, error)
// Find returns a repository from the datastore.

View File

@ -16,7 +16,7 @@ package core
import "context"
// Syncer synchonrizes the account repository list.
// Syncer synchronizes the account repository list.
type Syncer interface {
Sync(context.Context, *User) (*Batch, error)
}

View File

@ -26,7 +26,7 @@ import (
// HandleRepair returns an http.HandlerFunc that processes http
// requests to repair the repository hooks and sync the repository
// deetails.
// details.
func HandleRepair(
hooks core.HookService,
repoz core.RepositoryService,

View File

@ -39,7 +39,7 @@ func HandleSync(syncer core.Syncer, repos core.RepositoryStore) http.HandlerFunc
_, err := syncer.Sync(ctx, viewer)
if err != nil {
logger.FromContext(ctx).WithError(err).
Debugln("api: cannot synchrnoize account")
Debugln("api: cannot synchronize account")
}
}(ctx, viewer)
w.WriteHeader(204)
@ -50,7 +50,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")
return
}
list, err := repos.List(r.Context(), viewer.ID)

View File

@ -517,7 +517,7 @@ func (r *Runner) Run(ctx context.Context, id int64) error {
}
// Start starts N build runner processes. Each process polls
// the server for pednding builds to execute.
// the server for pending builds to execute.
func (r *Runner) Start(ctx context.Context, n int) error {
var g errgroup.Group
for i := 0; i < n; i++ {

View File

@ -18,7 +18,7 @@ import (
// user is a human being.
var ErrCannotVerify = errors.New("Cannot verify user authenticity")
// Nobot enfoces an admission policy that restricts access to
// Nobot enforces an admission policy that restricts access to
// users accounts that were recently created and may be bots.
// The policy expects the source control management system will
// identify and remove the bot accounts before they would be

View File

@ -25,7 +25,7 @@ import (
// user account and admissions are closed.
var ErrClosed = errors.New("User registration is disabled")
// Open enfoces an open admission policy by default unless
// Open enforces an open admission policy by default unless
// disabled.
func Open(disabled bool) core.AdmissionService {
return &closed{disabled: disabled}

View File

@ -44,7 +44,7 @@ func (c *combined) List(ctx context.Context, req *core.RegistryArgs) ([]*core.Re
}
// if trace level debugging is enabled we print
// all registry credentials retrieved from the
// various registy sources.
// various registry sources.
logger := logger.FromContext(ctx)
if logrus.IsLevelEnabled(logrus.TraceLevel) {
if len(all) == 0 {

View File

@ -49,7 +49,7 @@ import (
// TODO(bradrydzewski): gitea, push hook missing repository html url
// TODO(bradrydzewski): bitbucket, pull request hook missing author email.
// TODO(bradrydzewski): bitbucket, hooks missing defualt repository branch.
// TODO(bradrydzewski): bitbucket, hooks missing default repository branch.
// TODO(bradrydzewski): github, push hook timestamp is negative value.
// TODO(bradrydzewski): github, pull request message is empty

View File

@ -38,7 +38,7 @@ func convertRepository(src *scm.Repository) *core.Repository {
}
// convertVisibility is a helper function that returns the
// repository visibliity based on the privacy flag.
// repository visibility based on the privacy flag.
func convertVisibility(src *scm.Repository) string {
switch {
case src.Private == true:

View File

@ -55,7 +55,7 @@ func (s *Synchronizer) SetFilter(fn FilterFunc) {
s.match = fn
}
// Sync synchonrizes the user repository list in 6 easy steps.
// Sync synchronizes the user repository list in 6 easy steps.
func (s *Synchronizer) Sync(ctx context.Context, user *core.User) (*core.Batch, error) {
logger := logrus.WithField("login", user.Login)
logger.Debugln("syncer: begin repository sync")

View File

@ -121,7 +121,7 @@ func (db *DB) Driver() Driver {
return db.driver
}
// Close cloes the database connection.
// Close closes the database connection.
func (db *DB) Close() error {
return db.conn.Close()
}

View File

@ -95,7 +95,7 @@ func TestCron_Cancel(t *testing.T) {
// This unit tests demonstrates that if an error is encountered
// when returning a list of ready cronjobs, the process exits
// immadiately with an error message.
// immediately with an error message.
func TestCron_ErrorList(t *testing.T) {
controller := gomock.NewController(t)
defer controller.Finish()

View File

@ -77,7 +77,7 @@ func skipMessageEval(str string) bool {
// func skipPaths(document *config.Config, paths []string) bool {
// switch {
// // changed files are only returned for push and pull request
// // events. If the list of changed files is empty the sytem will
// // events. If the list of changed files is empty the system will
// // force-run all pipelines and pipeline steps
// case len(paths) == 0:
// return false