Skip to content

Commit

Permalink
Merge branch 'master' of github.com:theriverman/taigo
Browse files Browse the repository at this point in the history
  • Loading branch information
theriverman committed Feb 28, 2021
2 parents 77dcf19 + 82f603d commit f72ded6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 0 additions & 5 deletions contribute/build-and-run.bat

This file was deleted.

2 changes: 2 additions & 0 deletions contribute/build-and-run.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
go build -o taigo-dev.exe -ldflags "-X main.taigaUsername=$env:taigaUsername -X main.taigaPassword=$env:taigaPassword -X main.sandboxProjectSlug=$env:sandboxProjectSlug -X main.sandboxEpicID=$env:sandboxEpicID -X main.sandboxFileUploadPath=$env:sandboxFileUploadPath"
.\taigo-dev.exe
10 changes: 9 additions & 1 deletion contribute/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ func init() {
* fileAttachmentUploadPath = "C:\\Images\\Bad-puns-make-me-sic.1.jpg" // WINDOWS
*/

for _, v := range []string{taigaUsername, taigaPassword, sandboxProjectSlug, sandboxEpicID, sandboxFileUploadPath} {
if v == "" {
log.Fatalln("All mandatory values must be set through an environment variable.",
"See README.md in the contribute folder for details!",
)
}
}

// Convert Epic ID string to int
var e error
sandboxEpicID2, e = strconv.Atoi(sandboxEpicID)
Expand Down Expand Up @@ -156,7 +164,7 @@ func main() {
// Get milestones (for default project if set)
// (total of 3; limited by the for-loop)
log.Printf("Getting all Milestones(Sprints) for Project ID=%d, and printing the first 3 to the console:\n", project.ID)
milestones, mti, err := client.Project.Milestone.List(nil)
milestones, mti, err := client.Project.Milestone.List(&taiga.MilestonesQueryParams{Project: project.ID})
if err != nil {
log.Println(err)
return
Expand Down

0 comments on commit f72ded6

Please sign in to comment.