Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/api_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package api

import (
"github.com/semaphoreui/semaphore/util"
"net/http"
"net/http/httptest"
"testing"

"github.com/semaphoreui/semaphore/util"
)

func TestApiPing(t *testing.T) {
Expand Down
7 changes: 4 additions & 3 deletions api/apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import (
"encoding/json"
"errors"
"fmt"
"net/http"
"reflect"
"sort"

"github.com/semaphoreui/semaphore/api/helpers"
"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/pkg/conv"
"github.com/semaphoreui/semaphore/util"
"net/http"
"reflect"
"sort"
)

func validateAppID(str string) error {
Expand Down
3 changes: 2 additions & 1 deletion api/apps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package api

import (
"fmt"
"github.com/semaphoreui/semaphore/pkg/conv"
"testing"

"github.com/semaphoreui/semaphore/pkg/conv"
)

func TestStructToMap(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion api/cache.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package api

import (
"net/http"

"github.com/semaphoreui/semaphore/api/helpers"
"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/util"
log "github.com/sirupsen/logrus"
"net/http"
)

func clearCache(w http.ResponseWriter, r *http.Request) {
Expand Down
3 changes: 2 additions & 1 deletion api/events.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package api

import (
"net/http"

"github.com/semaphoreui/semaphore/api/helpers"
"github.com/semaphoreui/semaphore/db"
"net/http"
)

// nolint: gocyclo
Expand Down
3 changes: 2 additions & 1 deletion api/helpers/event_log.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package helpers

import (
"net/http"

"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/pro_interfaces"
log "github.com/sirupsen/logrus"
"net/http"
)

type EventLogItem struct {
Expand Down
3 changes: 2 additions & 1 deletion api/helpers/query_params.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package helpers

import (
"github.com/semaphoreui/semaphore/db"
"net/url"
"slices"
"strconv"

"github.com/semaphoreui/semaphore/db"
)

func QueryParamsForProps(url *url.URL, props db.ObjectProps) (params db.RetrieveQueryParams) {
Expand Down
3 changes: 2 additions & 1 deletion api/options.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package api

import (
"net/http"

"github.com/semaphoreui/semaphore/api/helpers"
"github.com/semaphoreui/semaphore/db"
"net/http"
)

func setOption(w http.ResponseWriter, r *http.Request) {
Expand Down
3 changes: 2 additions & 1 deletion api/projects/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package projects
import (
"errors"
"fmt"
"net/http"

"github.com/semaphoreui/semaphore/api/helpers"
"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/pkg/random"
"github.com/semaphoreui/semaphore/services/server"
"net/http"
)

type EnvironmentController struct {
Expand Down
3 changes: 2 additions & 1 deletion api/projects/integration_alias.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package projects

import (
"net/http"

"github.com/semaphoreui/semaphore/api/helpers"
"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/pkg/random"
"github.com/semaphoreui/semaphore/util"
"net/http"
)

type publicAlias struct {
Expand Down
3 changes: 2 additions & 1 deletion api/projects/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package projects
import (
"errors"
"fmt"
"net/http"

"github.com/semaphoreui/semaphore/api/helpers"
"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/db_lib"
"github.com/semaphoreui/semaphore/util"
"net/http"
)

// RepositoryMiddleware ensures a repository exists and loads it to the context
Expand Down
3 changes: 2 additions & 1 deletion api/runners.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package api
import (
"bufio"
"bytes"
"net/http"

"github.com/semaphoreui/semaphore/api/helpers"
"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/util"
log "github.com/sirupsen/logrus"
"net/http"
)

func getAllRunners(w http.ResponseWriter, r *http.Request) {
Expand Down
5 changes: 3 additions & 2 deletions api/sockets/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package sockets

import (
"fmt"
"net/http"
"time"

"github.com/semaphoreui/semaphore/api/helpers"
"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/pkg/tz"
"net/http"
"time"

"github.com/gorilla/websocket"
log "github.com/sirupsen/logrus"
Expand Down
5 changes: 3 additions & 2 deletions api/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package api
import (
"bytes"
"fmt"
"image/png"
"net/http"

"github.com/pquerna/otp"
"github.com/pquerna/otp/totp"
"github.com/semaphoreui/semaphore/api/helpers"
"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/pro_interfaces"
log "github.com/sirupsen/logrus"
"image/png"
"net/http"

"github.com/semaphoreui/semaphore/util"
)
Expand Down
3 changes: 2 additions & 1 deletion cli/cmd/runner.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package cmd

import (
"os"

"github.com/semaphoreui/semaphore/pkg/ssh"
"github.com/semaphoreui/semaphore/services/runners"
"github.com/spf13/cobra"
"os"
)

func createRunnerJobPool() *runners.JobPool {
Expand Down
1 change: 1 addition & 0 deletions cli/cmd/runner_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"fmt"

"github.com/semaphoreui/semaphore/cli/setup"
"github.com/semaphoreui/semaphore/util"
"github.com/spf13/cobra"
Expand Down
3 changes: 2 additions & 1 deletion cli/cmd/server.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package cmd

import (
"github.com/spf13/cobra"
"net/http"
"strings"

"github.com/spf13/cobra"
)

func init() {
Expand Down
3 changes: 2 additions & 1 deletion cli/cmd/user_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package cmd

import (
"fmt"
"os"

"github.com/semaphoreui/semaphore/db"
"github.com/spf13/cobra"
"os"
)

func init() {
Expand Down
3 changes: 2 additions & 1 deletion cli/cmd/user_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package cmd

import (
"fmt"
"os"

"github.com/semaphoreui/semaphore/db"
"github.com/spf13/cobra"
"os"
)

func init() {
Expand Down
3 changes: 2 additions & 1 deletion cli/cmd/user_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package cmd

import (
"fmt"
"github.com/spf13/cobra"
"os"

"github.com/spf13/cobra"
)

func init() {
Expand Down
3 changes: 2 additions & 1 deletion cli/cmd/user_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package cmd
import (
"errors"
"fmt"
"os"

"github.com/semaphoreui/semaphore/db"
"github.com/spf13/cobra"
"os"
)

func init() {
Expand Down
1 change: 1 addition & 0 deletions cli/cmd/user_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"fmt"

"github.com/semaphoreui/semaphore/db"
"github.com/spf13/cobra"
)
Expand Down
3 changes: 2 additions & 1 deletion cli/cmd/user_totp.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package cmd

import (
"fmt"
"os"

"github.com/mdp/qrterminal/v3"
"github.com/pquerna/otp/totp"
"github.com/semaphoreui/semaphore/util"
"github.com/spf13/cobra"
"os"
)

func init() {
Expand Down
3 changes: 2 additions & 1 deletion db/Environment_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package db

import (
"github.com/stretchr/testify/assert"
"testing"

"github.com/stretchr/testify/assert"
)

func Test_EnvironmentValidate_EmptyName_ReturnsError(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion db/Event.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package db

import (
log "github.com/sirupsen/logrus"
"time"

log "github.com/sirupsen/logrus"
)

// Event represents information generated by ansible or api action captured to the database during execution
Expand Down
3 changes: 2 additions & 1 deletion db/bolt/Task_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package bolt

import (
"github.com/semaphoreui/semaphore/db"
"testing"

"github.com/semaphoreui/semaphore/db"
)

func TestTask_GetVersion(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions db/bolt/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package bolt

import (
"encoding/json"

"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/pkg/tz"
"go.etcd.io/bbolt"
Expand Down
1 change: 1 addition & 0 deletions db/bolt/global_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package bolt

import (
"encoding/base64"

"github.com/gorilla/securecookie"
"github.com/semaphoreui/semaphore/db"
"github.com/semaphoreui/semaphore/pkg/tz"
Expand Down
3 changes: 2 additions & 1 deletion db/bolt/global_runner_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package bolt

import (
"testing"

"github.com/semaphoreui/semaphore/db"
"github.com/stretchr/testify/assert"
"testing"
)

func Test_GetRunnerByToken_ReturnsGlobalRunnerWhenTokenExists(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion db/bolt/integrations_alias.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package bolt

import (
"github.com/semaphoreui/semaphore/db"
"reflect"

"github.com/semaphoreui/semaphore/db"
)

var integrationAliasProps = db.ObjectProps{
Expand Down
3 changes: 2 additions & 1 deletion db/bolt/migration_2_10_12_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package bolt

import (
"encoding/json"
"go.etcd.io/bbolt"
"testing"

"go.etcd.io/bbolt"
)

func TestMigration_2_10_12_Apply(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion db/bolt/migration_2_10_16_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package bolt

import (
"encoding/json"
"go.etcd.io/bbolt"
"testing"

"go.etcd.io/bbolt"
)

func TestMigration_2_10_16_Apply(t *testing.T) {
Expand Down
Loading
Loading