Skip to content

Commit

Permalink
add comment to page
Browse files Browse the repository at this point in the history
  • Loading branch information
Marijn authored and justmiles committed Feb 19, 2021
1 parent 739273e commit 239cb83
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func init() {

rootCmd.Flags().SetInterspersed(false)
rootCmd.PersistentFlags().StringVarP(&m.Space, "space", "s", "", "Space in which page should be created")
rootCmd.PersistentFlags().StringVarP(&m.Comment, "comment", "c", "", "(Optional) Add comment to page")
rootCmd.PersistentFlags().StringVarP(&m.Username, "username", "u", "", "Confluence username. (Alternatively set CONFLUENCE_USERNAME environment variable)")
rootCmd.PersistentFlags().StringVarP(&m.Password, "password", "p", "", "Confluence password. (Alternatively set CONFLUENCE_PASSWORD environment variable)")
rootCmd.PersistentFlags().StringVarP(&m.Endpoint, "endpoint", "e", lib.DefaultEndpoint, "Confluence endpoint. (Alternatively set CONFLUENCE_ENDPOINT environment variable)")
Expand Down
1 change: 1 addition & 0 deletions lib/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func (f *MarkdownFile) Upload(m *Markdown2Confluence) (urlPath string, err error
if len(contentResults) > 0 {
content = contentResults[0]
content.Version.Number++
content.Version.Message = m.Comment
content.Body.Storage.Representation = "storage"
content.Body.Storage.Value = wikiContent
content.Space.Key = m.Space
Expand Down
1 change: 1 addition & 0 deletions lib/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const (
// Markdown2Confluence stores the settings for each run
type Markdown2Confluence struct {
Space string
Comment string
Title string
File string
Ancestor string
Expand Down

0 comments on commit 239cb83

Please sign in to comment.