-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
33 lines (27 loc) · 782 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"github.com/JZGoopi/releaseter/api"
"github.com/JZGoopi/releaseter/base"
"github.com/JZGoopi/releaseter/dao"
"github.com/JZGoopi/releaseter/data"
"github.com/JZGoopi/releaseter/model"
"github.com/JZGoopi/releaseter/view"
_ "github.com/joho/godotenv/autoload"
)
func main() {
base.Init()
data.Init()
lablePulls := data.GetNewPullWithLables()
template := view.GenCategoriesTemplate(lablePulls)
userInfo := base.GetUserInfo()
config := base.GetConfig()
if config.ClearHistoryDraft {
api.DelReleases(userInfo.Repo, userInfo.Token, dao.GetAllReleaseDraftIds(userInfo))
}
api.PostReleases(userInfo.Repo, userInfo.Token, model.GithubPostRelease{
TagName: data.GetTag(),
Name: data.GetName(),
Body: template,
Draft: true,
})
}