From 383779b5305dadee518397648eefa6634cc64135 Mon Sep 17 00:00:00 2001 From: Gorbunov Kirill Andreevich Date: Sun, 17 Mar 2024 15:46:10 +0300 Subject: [PATCH] #8 add config. --- .gitea/pkgdashcli.yaml | 6 ++++++ .gitignore | 2 -- internal/source/gitea/gitea.go | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .gitea/pkgdashcli.yaml diff --git a/.gitea/pkgdashcli.yaml b/.gitea/pkgdashcli.yaml new file mode 100644 index 0000000..5264ebb --- /dev/null +++ b/.gitea/pkgdashcli.yaml @@ -0,0 +1,6 @@ +branches: [master] +source: + type: gitea + apiurl: https://git.unistack.org/api/v1 + repository: pkgdash + owner: kgorbunov \ No newline at end of file diff --git a/.gitignore b/.gitignore index a91e623..d2176e5 100644 --- a/.gitignore +++ b/.gitignore @@ -30,5 +30,3 @@ cmd/pkgdash/pkgdash cmd/pkgdashcli/pkgdashcli *.sqlite *.db -.gitea/pkgdashcli.yaml -/.gitea/ diff --git a/internal/source/gitea/gitea.go b/internal/source/gitea/gitea.go index 494cb79..af6daf7 100644 --- a/internal/source/gitea/gitea.go +++ b/internal/source/gitea/gitea.go @@ -42,7 +42,7 @@ type Gitea struct { func NewGitea(cfg configcli.Config) *Gitea { return &Gitea{ URL: cfg.Source.APIURL, - Token: cfg.Source.Token, + Token: os.Getenv("GITEA_TOKEN"), PRTitle: cfg.PullRequestTitle, PRBody: cfg.PullRequestBody, Repository: cfg.Source.Repository,