Skip to content

Commit a67956d

Browse files
committed
cli
1 parent e39c8c1 commit a67956d

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

main.go

+6
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ func main() {
130130
ls.AddLabels(url, anmaToken, created.Id, strings.Split(labels, ","))
131131
}
132132
printPage(created)
133+
case "addLabel":
134+
page := ps.GetPage(url, anmaToken, pageId)
135+
if labels != "" {
136+
ls.AddLabels(url, anmaToken, page.Id, strings.Split(labels, ","))
137+
}
138+
log.Printf("Added labels '%s' to page '%s'", labels, page.Id)
133139
}
134140

135141
// Jira instance

readme.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Confluence REST service on Golang
22

3-
https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/
3+
The CLI app (or internal Go API) to interact with Confluence and Jira.
44

55
- Groovy version - https://github.com/AndriiMaliuta/confluence-rest-service-groovy
66
- Rust version - https://github.com/AndriiMaliuta/rust-atlas-rest
77

88
# Native CLI app
9+
### Installation
10+
Download execution file from Releases https://github.com/AndriiMaliuta/atlassian-rest-golang/releases.
11+
912

1013
### Confluence
1114
```bash

run.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
./atlas --type confluence --action createPage --title "p1" --space "TEST" --body "lorem" --parent "136445988"
77
# create page with labels 'aa', 'bb'
88
./atlas --type confluence --action createPage --title "p1" --space "TEST" --body "lorem" --parent "136445988" --labels "aa,bb"
9-
./atlas --type confluence --action copyPage --id "" --newTitle "" --parent "136445988"
9+
./atlas --type confluence --action copyPage --id "" --newTitle "" --parent "136125988"
10+
./atlas --type confluence --action addLabel --id "858292123" --labels "label1,label2"
1011

1112
# Jira
1213
./atlas --type jira --action getIssue --key "AAA-3"

0 commit comments

Comments
 (0)