Skip to content

Fix public doc linting issues#591

Merged
flin-8 merged 5 commits into
mainfrom
frank/linting
Apr 19, 2026
Merged

Fix public doc linting issues#591
flin-8 merged 5 commits into
mainfrom
frank/linting

Conversation

@flin-8
Copy link
Copy Markdown
Contributor

@flin-8 flin-8 commented Apr 17, 2026

@flin-8 flin-8 self-assigned this Apr 17, 2026
Comment thread cmd/gen-docs/main.go

{{.Command.Long}}
` + "\n```" + `{{define "T1"}}Usage:{{if .Runnable}}
` + "\n```text" + `{{define "T1"}}Usage:{{if .Runnable}}
Copy link
Copy Markdown
Contributor Author

@flin-8 flin-8 Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MD040 fenced-code-language - Fenced code blocks should have a language specified

Comment thread cmd/gen-docs/main.go
- [Octopus CLI](/docs/octopus-rest-api/cli)
- [Creating API keys](/docs/octopus-rest-api/how-to-create-an-api-key)`
- [Creating API keys](/docs/octopus-rest-api/how-to-create-an-api-key)
`
Copy link
Copy Markdown
Contributor Author

@flin-8 flin-8 Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MD047 single-trailing-newline - Files should end with a single newline character

Comment thread cmd/gen-docs/main.go
## Commands {#octopusCommandLine-Commands}

` + "\n`octopus` supports the following commands:\n" +
` + "`octopus` supports the following commands:" +
Copy link
Copy Markdown
Contributor Author

@flin-8 flin-8 Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MD012 no-multiple-blanks - Multiple consecutive blank lines

Short: "Create an AWS account",
Long: "Create an AWS account in Octopus Deploy",
Example: heredoc.Docf("$ %s account aws create", constants.ExecutableName),
Example: heredoc.Docf("%s account aws create", constants.ExecutableName),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ %[1]s project variable update
%[1]s project variable list "Deploy Web App"
%[1]s project variable view --name "DatabaseName" --project Deploy
%[1]s project variable update
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MD014 commands-show-output - Dollar signs used before commands without showing output

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zentron if we think it's important to keep the $ at the front, then we can override the linting rule

Copy link
Copy Markdown
Contributor

@zentron zentron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scanning through the changes it all looks reasonable, im assuming the format must have changed at some point since it was last generated. 🤷

@flin-8 flin-8 merged commit 83aba44 into main Apr 19, 2026
5 checks passed
@flin-8 flin-8 deleted the frank/linting branch April 19, 2026 23:38
@NickJosevski
Copy link
Copy Markdown
Contributor

Picking up on the suggestion to automate the docs update — worth noting the workflow already runs on v* tag pushes (see .github/workflows/generate-docs.yml), so docs do regenerate on every release. The gap is between releases, where they can drift.

Recommendation: add push-to-main with a path filter, plus an empty-diff guard so we don't open no-op PRs. Preferable to a schedule: because it catches doc-affecting changes promptly and avoids running CI when nothing relevant changed.

Trigger:

on:
  workflow_dispatch:
  push:
    branches:
      - main
    tags:
      - 'v*'
    paths:
      - 'cmd/gen-docs/**'
      - 'pkg/cmd/**'
      - 'go.mod'
      - 'go.sum'
      - '.github/workflows/generate-docs.yml'

Then a Check for docs changes step after Generate cli docs that runs git status --porcelain in the docs checkout, sets a changed output, and gates the Commit / Push / Create PR steps on if: steps.docs-diff.outputs.changed == 'true'.

A couple of notes:

  • GitHub does not apply paths filters to tag pushes, so the existing release behaviour is preserved.
  • The branch name uses a timestamp (enh-cliupdate-octopus-$(date ...)), so frequent merges could pile up open PRs in the docs repo. If that becomes noisy a follow-up could reuse a rolling branch and update the existing PR.

A schedule: (e.g. weekly) is a fine fallback if we'd rather decouple from commit cadence, but it'll still need the same empty-diff guard and will lag merges by up to a week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants