Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2017-05-03 10:06:11 +08:00
parent c018f1a475
commit fefbf9f06b
No known key found for this signature in database
GPG key ID: 0F84B2110C500B1F
3 changed files with 4 additions and 4 deletions

View file

@ -42,7 +42,7 @@ const (
)
// getStatus is a helper functin that converts a Drone
// status to a GitHub status.
// status to a Gitea status.
func getStatus(status string) gitea.StatusState {
switch status {
case model.StatusPending, model.StatusBlocked:

View file

@ -117,7 +117,7 @@ func Test_gitea(t *testing.T) {
})
})
g.It("Should register repositroy hooks", func() {
g.It("Should register repository hooks", func() {
err := c.Activate(fakeUser, fakeRepo, "http://localhost")
g.Assert(err == nil).IsTrue()
})
@ -134,7 +134,7 @@ func Test_gitea(t *testing.T) {
g.Assert(string(raw)).Equal("{ platform: linux/amd64 }")
})
g.It("Should return nil frome send build status", func() {
g.It("Should return nil from send build status", func() {
err := c.Status(fakeUser, fakeRepo, fakeBuild, "http://gitea.io")
g.Assert(err == nil).IsTrue()
})

View file

@ -22,7 +22,7 @@ const (
refTag = "tag"
)
// parseHook parses a Bitbucket hook from an http.Request request and returns
// parseHook parses a Gitea hook from an http.Request request and returns
// Repo and Build detail. If a hook type is unsupported nil values are returned.
func parseHook(r *http.Request) (*model.Repo, *model.Build, error) {
switch r.Header.Get(hookEvent) {