Change internal name

Signed-off-by: Steven Kriegler <sk.bunsenbrenner@gmail.com>
This commit is contained in:
justusbunsi 2022-07-11 17:39:22 +02:00
parent d943a7f420
commit 51211d77cd
No known key found for this signature in database
GPG key ID: 82B29BF2507F9F8B
18 changed files with 43 additions and 43 deletions

View file

@ -15,10 +15,10 @@
```bash ```bash
# Build docker environment # Build docker environment
docker build -t gitea-sonarqube-pr-bot/dev -f contrib/Dockerfile contrib docker build -t gitea-sonarqube-bot/dev -f contrib/Dockerfile contrib
# Start the environment # Start the environment
docker run --rm -it -p 49182:3000 -v "$(pwd):/projects" gitea-sonarqube-pr-bot/dev docker run --rm -it -p 49182:3000 -v "$(pwd):/projects" gitea-sonarqube-bot/dev
``` ```
## Build and Run ## Build and Run
@ -55,7 +55,7 @@ make helm-params
For local purposes For local purposes
```bash ```bash
docker build -t gitea-sonarqube-pr-bot/prod . docker build -t gitea-sonarqube-bot/prod .
``` ```
**Docker image** **Docker image**

View file

@ -11,10 +11,10 @@ import (
"syscall" "syscall"
"time" "time"
"gitea-sonarqube-pr-bot/internal/api" "gitea-sonarqube-bot/internal/api"
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea" giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
sonarQubeSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube" sonarQubeSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

2
go.mod
View file

@ -1,4 +1,4 @@
module gitea-sonarqube-pr-bot module gitea-sonarqube-bot
go 1.18 go 1.18

View file

@ -5,10 +5,10 @@ import (
"log" "log"
"net/http" "net/http"
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea" giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube" sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
webhook "gitea-sonarqube-pr-bot/internal/webhooks/gitea" webhook "gitea-sonarqube-bot/internal/webhooks/gitea"
) )
type GiteaWebhookHandlerInferface interface { type GiteaWebhookHandlerInferface interface {

View file

@ -8,7 +8,7 @@ import (
"net/http/httptest" "net/http/httptest"
"testing" "testing"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -9,9 +9,9 @@ import (
"os" "os"
"testing" "testing"
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea" giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube" sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"

View file

@ -7,10 +7,10 @@ import (
"net/http" "net/http"
"strings" "strings"
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea" giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube" sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
webhook "gitea-sonarqube-pr-bot/internal/webhooks/sonarqube" webhook "gitea-sonarqube-bot/internal/webhooks/sonarqube"
) )
type SonarQubeWebhookHandlerInferface interface { type SonarQubeWebhookHandlerInferface interface {

View file

@ -9,7 +9,7 @@ import (
"regexp" "regexp"
"testing" "testing"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -2,7 +2,7 @@ package gitea
import ( import (
"fmt" "fmt"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
"log" "log"
"code.gitea.io/sdk/gitea" "code.gitea.io/sdk/gitea"
@ -31,7 +31,7 @@ func (sdk *GiteaSdk) PostComment(repo settings.GiteaRepository, idx int, msg str
func (sdk *GiteaSdk) UpdateStatus(repo settings.GiteaRepository, ref string, details StatusDetails) error { func (sdk *GiteaSdk) UpdateStatus(repo settings.GiteaRepository, ref string, details StatusDetails) error {
opt := gitea.CreateStatusOption{ opt := gitea.CreateStatusOption{
TargetURL: details.Url, TargetURL: details.Url,
Context: "gitea-sonarqube-pr-bot", Context: "gitea-sonarqube-bot",
Description: details.Message, Description: details.Message,
State: gitea.StatusState(details.State), State: gitea.StatusState(details.State),
} }

View file

@ -10,8 +10,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"gitea-sonarqube-pr-bot/internal/actions" "gitea-sonarqube-bot/internal/actions"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
) )
func ParsePRIndex(name string) (int, error) { func ParsePRIndex(name string) (int, error) {

View file

@ -8,7 +8,7 @@ import (
"regexp" "regexp"
"testing" "testing"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

View file

@ -26,7 +26,7 @@ sonarqube:
additionalMetrics: [] additionalMetrics: []
projects: projects:
- sonarqube: - sonarqube:
key: gitea-sonarqube-pr-bot key: gitea-sonarqube-bot
gitea: gitea:
owner: example-organization owner: example-organization
name: pr-bot name: pr-bot
@ -130,7 +130,7 @@ sonarqube:
additionalMetrics: "new_security_hotspots" additionalMetrics: "new_security_hotspots"
projects: projects:
- sonarqube: - sonarqube:
key: gitea-sonarqube-pr-bot key: gitea-sonarqube-bot
gitea: gitea:
owner: example-organization owner: example-organization
name: pr-bot name: pr-bot
@ -203,7 +203,7 @@ sonarqube:
value: fake-sonarqube-token value: fake-sonarqube-token
projects: projects:
- sonarqube: - sonarqube:
key: gitea-sonarqube-pr-bot key: gitea-sonarqube-bot
gitea: gitea:
owner: example-organization owner: example-organization
name: pr-bot name: pr-bot
@ -261,7 +261,7 @@ func TestLoadProjectsStructure(t *testing.T) {
expectedProjects := []Project{ expectedProjects := []Project{
{ {
SonarQube: struct{ Key string }{ SonarQube: struct{ Key string }{
Key: "gitea-sonarqube-pr-bot", Key: "gitea-sonarqube-bot",
}, },
Gitea: GiteaRepository{ Gitea: GiteaRepository{
Owner: "example-organization", Owner: "example-organization",
@ -319,7 +319,7 @@ sonarqube:
additionalMetrics: "new_security_hotspots" additionalMetrics: "new_security_hotspots"
projects: projects:
- sonarqube: - sonarqube:
key: gitea-sonarqube-pr-bot key: gitea-sonarqube-bot
gitea: gitea:
owner: example-organization owner: example-organization
name: pr-bot name: pr-bot

View file

@ -5,10 +5,10 @@ import (
"fmt" "fmt"
"log" "log"
"gitea-sonarqube-pr-bot/internal/actions" "gitea-sonarqube-bot/internal/actions"
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea" giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube" sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
) )
type issue struct { type issue struct {

View file

@ -5,9 +5,9 @@ import (
"fmt" "fmt"
"log" "log"
giteaSdk "gitea-sonarqube-pr-bot/internal/clients/gitea" giteaSdk "gitea-sonarqube-bot/internal/clients/gitea"
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube" sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
) )
type pullRequest struct { type pullRequest struct {

View file

@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"log" "log"
sqSdk "gitea-sonarqube-pr-bot/internal/clients/sonarqube" sqSdk "gitea-sonarqube-bot/internal/clients/sonarqube"
) )
type properties struct { type properties struct {

View file

@ -4,7 +4,7 @@ import (
"regexp" "regexp"
"testing" "testing"
"gitea-sonarqube-pr-bot/internal/settings" "gitea-sonarqube-bot/internal/settings"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )

4
package-lock.json generated
View file

@ -1,10 +1,10 @@
{ {
"name": "gitea-sonarqube-pr-bot", "name": "gitea-sonarqube-bot",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "gitea-sonarqube-pr-bot", "name": "gitea-sonarqube-bot",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"readme-generator-for-helm": "https://github.com/bitnami-labs/readme-generator-for-helm/tarball/main" "readme-generator-for-helm": "https://github.com/bitnami-labs/readme-generator-for-helm/tarball/main"

View file

@ -1,5 +1,5 @@
{ {
"name": "gitea-sonarqube-pr-bot", "name": "gitea-sonarqube-bot",
"description": "Integrate SonarQube analysis into Gitea Pull Requests", "description": "Integrate SonarQube analysis into Gitea Pull Requests",
"author": "Steven Kriegler <sk.bunsenbrenner@gmail.com>", "author": "Steven Kriegler <sk.bunsenbrenner@gmail.com>",
"license": "MIT", "license": "MIT",