Documentation
¶
Index ¶
- Constants
- Variables
- func CleanupRedirects(issueNumber string)
- func CreateMermaidTestPage()
- func CreateReleaseMergeRequest(version string)
- func CreateReleaseStableBranch(branch string)
- func FindExpiredContent()
- func FindUnusedImages(cmd *cobra.Command) (int, error)
- func LintMarkdownEOLSpaces(issueNumber string)
- func PrintSearchResults(results []SearchResult)
- func SelectReviewLanguages() error
- func UpdateArchives(branch string)
- type ExpiredContent
- type FileData
- type FrontmatterData
- type ImageInfo
- type Redirect
- type Redirects
- type SearchResult
- type URL
- type URLSet
- type Version
Constants ¶
const ( StdDateFormat = "2006-01-02" RedirectsFile = "data/redirects.yaml" ExtensionPeriodMonths = 9 GitLabDocsPrefix = "https://docs.gitlab.com" GitLabDocsLocalPrefix = "http://localhost:1313" DefaultRepoURL = "git@gitlab.com:gitlab-org/technical-writing/docs-gitlab-com.git" ProductMRLabels = "Technical Writing,documentation,maintenance::refactor,type::maintenance" DocsMRLabels = "redirects,Technical Writing,Category:Docs Site,maintenance::refactor,type::maintenance" )
const ARCHIVES_PROJECT_ID = "39455850"
Variables ¶
var DateRegex = regexp.MustCompile(`start_remove.*?remove_date:\s*['"](\d{4}-\d{2}-\d{2})['"]`)
var EnvVars = map[string]string{"LEFTHOOK": "0"}
Environment variables for the git commands that stage, commit, and push remote changes "LEFTHOOK": "0" - disables LEFTHOOK jobs
var ErrCreationCancelled = errors.New("operation cancelled by user")
var ErrNoBranchName = errors.New("no branch name could be determined")
var TargetLanguages = []string{"fr-fr", "ja-jp", "ko-kr"}
TargetLanguages The list of languages to iterate through. Important: Keep this sorted
Functions ¶
func CleanupRedirects ¶
func CleanupRedirects(issueNumber string)
Cleans up expired redirect URLs from redirects.yaml and creates MR with the updated file. Additonally, removes expired files and creates MRs in their respective repositories.
func CreateMermaidTestPage ¶
func CreateMermaidTestPage()
func CreateReleaseMergeRequest ¶
func CreateReleaseMergeRequest(version string)
func CreateReleaseStableBranch ¶
func CreateReleaseStableBranch(branch string)
func FindExpiredContent ¶
func FindExpiredContent()
func FindUnusedImages ¶
FindUnusedImages implements the find-unused-images command
func LintMarkdownEOLSpaces ¶
func LintMarkdownEOLSpaces(issueNumber string)
func PrintSearchResults ¶
func PrintSearchResults(results []SearchResult)
func SelectReviewLanguages ¶
func SelectReviewLanguages() error
SelectReviewLanguages picks which target language(s) to build for the upstream review app pipeline by updating config/translation/hugo.yaml
func UpdateArchives ¶
func UpdateArchives(branch string)
Types ¶
type ExpiredContent ¶
type ExpiredContent struct {
Filename string
LineNum int
ProductID string
RemoveDate string
LineText string
}
ExpiredContent represents content that should be removed based on the date
type FrontmatterData ¶
type ImageInfo ¶
type ImageInfo struct {
FilePath string
RelativePath string
Filename string
Used bool
Directory string
}
ImageInfo holds information about an image file
type SearchResult ¶
SearchResult represents a search match
func SearchMarkdownFiles ¶
func SearchMarkdownFiles(searchPattern string) ([]SearchResult, error)
SearchMarkdownFiles searches for a given pattern in markdown files across all product repos