fix typo
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
c018f1a475
commit
fefbf9f06b
3 changed files with 4 additions and 4 deletions
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue