mirror of
https://github.com/MichaelMure/git-bug.git
synced 2025-01-08 19:19:01 +03:00
a round of cleanup
This commit is contained in:
parent
2fd5f71b59
commit
475b7b4c49
4
Makefile
4
Makefile
@ -19,7 +19,7 @@ debug-build:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
go generate
|
go generate
|
||||||
go install .
|
go install -ldflags "$(LDFLAGS)" .
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -bench=. ./...
|
go test -bench=. ./...
|
||||||
@ -30,7 +30,7 @@ pack-webui:
|
|||||||
|
|
||||||
# produce a build that will fetch the web UI from the filesystem instead of from the binary
|
# produce a build that will fetch the web UI from the filesystem instead of from the binary
|
||||||
debug-webui:
|
debug-webui:
|
||||||
go build -tags=debugwebui
|
go build -ldflags "$(LDFLAGS)" -tags=debugwebui
|
||||||
|
|
||||||
clean-local-bugs:
|
clean-local-bugs:
|
||||||
git for-each-ref refs/bugs/ | cut -f 2 | xargs -r -n 1 git update-ref -d
|
git for-each-ref refs/bugs/ | cut -f 2 | xargs -r -n 1 git update-ref -d
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
package bug
|
package bug
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/MichaelMure/git-bug/identity"
|
"github.com/MichaelMure/git-bug/identity"
|
||||||
"github.com/MichaelMure/git-bug/util/test"
|
"github.com/MichaelMure/git-bug/util/test"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"testing"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPushPull(t *testing.T) {
|
func TestPushPull(t *testing.T) {
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
package bug
|
package bug
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/MichaelMure/git-bug/identity"
|
"github.com/MichaelMure/git-bug/identity"
|
||||||
"github.com/MichaelMure/git-bug/repository"
|
"github.com/MichaelMure/git-bug/repository"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"testing"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBugId(t *testing.T) {
|
func TestBugId(t *testing.T) {
|
||||||
|
@ -28,7 +28,7 @@ func (l *Label) UnmarshalGQL(v interface{}) error {
|
|||||||
|
|
||||||
// MarshalGQL implements the graphql.Marshaler interface
|
// MarshalGQL implements the graphql.Marshaler interface
|
||||||
func (l Label) MarshalGQL(w io.Writer) {
|
func (l Label) MarshalGQL(w io.Writer) {
|
||||||
w.Write([]byte(`"` + l.String() + `"`))
|
_, _ = w.Write([]byte(`"` + l.String() + `"`))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l Label) Validate() error {
|
func (l Label) Validate() error {
|
||||||
|
@ -4,11 +4,12 @@
|
|||||||
package graphql
|
package graphql
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/99designs/gqlgen/handler"
|
"github.com/99designs/gqlgen/handler"
|
||||||
"github.com/MichaelMure/git-bug/graphql/graph"
|
"github.com/MichaelMure/git-bug/graphql/graph"
|
||||||
"github.com/MichaelMure/git-bug/graphql/resolvers"
|
"github.com/MichaelMure/git-bug/graphql/resolvers"
|
||||||
"github.com/MichaelMure/git-bug/repository"
|
"github.com/MichaelMure/git-bug/repository"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handler is the root GraphQL http handler
|
// Handler is the root GraphQL http handler
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
package repository
|
package repository
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/MichaelMure/git-bug/util/git"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/MichaelMure/git-bug/util/git"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTreeEntryFormat(t *testing.T) {
|
func TestTreeEntryFormat(t *testing.T) {
|
||||||
|
@ -323,10 +323,3 @@ func splitWord(word string, length int) (string, string) {
|
|||||||
|
|
||||||
return string(result), string(leftover)
|
return string(result), string(leftover)
|
||||||
}
|
}
|
||||||
|
|
||||||
func minInt(a, b int) int {
|
|
||||||
if a > b {
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
return a
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user