Documentation ¶
Index ¶
- func AddChangelogToFile(changelog *model.Changelog, version *semver.Version, ...) (string, error)
- func AddTagSet(path, tag string) error
- func ChangeConfigWithCommitID(path, repoURL, commitID, specRPName string) error
- func ChangeConfigWithLocalPath(path, readmeFile, readmeGoFile string) error
- func CleanSDKGeneratedFiles(path string) error
- func ContainsPreviewAPIVersion(packagePath string) (bool, error)
- func EnumFilter(changelog *model.Changelog)
- func ExecuteAddIssueComment(path, repoOwner, repoName, issueNumber, comment, authToken string) error
- func ExecuteAddIssueLabels(path, repoOwner, repoName, issueNumber, authToken string, labels []string) error
- func ExecuteCreatePullRequest(...) (string, error)
- func ExecuteExampleGenerate(path, packagePath, flag string) error
- func ExecuteGitPush(path, remoteName, branchName string) (string, error)
- func ExecuteGoGenerate(path string) error
- func ExecuteGoimports(path string) error
- func FilterChangelog(changelog *model.Changelog, opts ...func(changelog *model.Changelog))
- func FuncFilter(changelog *model.Changelog)
- func GetAllVersionTags(rpName, namespaceName string) ([]string, error)
- func GetAlwaysSetBodyParamRequiredFlag(path string) (string, error)
- func GetExportsFromTag(sdkRepo repo.SDKRepository, packagePath, tag string) (*exports.Content, error)
- func GetPreviousVersionTag(isCurrentPreview bool, allReleases []string) string
- func GetSDKRepo(sdkRepoParam, sdkRepoURL string) (repo.SDKRepository, error)
- func GetSpecCommit(specRepoParam string) (string, error)
- func GetSpecRpName(packageRootPath string) (string, error)
- func GetTag(path string) (string, error)
- func InterfaceToAnyFilter(changelog *model.Changelog)
- func LROFilter(changelog *model.Changelog)
- func MarshalUnmarshalFilter(changelog *model.Changelog)
- func NonExportedFilter(changelog *model.Changelog)
- func PageableFilter(changelog *model.Changelog)
- func ReadV2ModuleNameToGetNamespace(path string) (map[string][]PackageInfo, error)
- func RemoveTagSet(path string) error
- func ReplaceNewClientNamePlaceholder(packageRootPath string, exports exports.Content) error
- func ReplaceReadmeNewClientName(packageRootPath string, exports exports.Content) error
- func ReplaceVersion(packageRootPath string, newVersion string) error
- func UpdateModuleDefinition(packageRootPath, rpName, namespaceName string, version *semver.Version) error
- func UpdateOnboardChangelogVersion(packageRootPath, versionNumber string) error
- type GenerateContext
- type GenerateParam
- type GenerateResult
- type PackageInfo
- type PullRequestLabel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddChangelogToFile ¶
func AddChangelogToFile(changelog *model.Changelog, version *semver.Version, packageRootPath, releaseDate string) (string, error)
add new changelog md to changelog file
func ChangeConfigWithCommitID ¶
replace repo URL and commit id in autorest.md file
func ChangeConfigWithLocalPath ¶
replace repo commit with local path in autorest.md file
func CleanSDKGeneratedFiles ¶
remove all sdk generated files in given path
func EnumFilter ¶
func ExecuteAddIssueComment ¶
func ExecuteAddIssueLabels ¶
func ExecuteExampleGenerate ¶
execute `pwsh Invoke-MgmtTestgen` command and fetch result
func ExecuteGitPush ¶
func ExecuteGoGenerate ¶
execute `go generate` command and fetch result
func ExecuteGoimports ¶
execute `goimports` command and fetch result
func FilterChangelog ¶
func FuncFilter ¶
func GetAllVersionTags ¶
func GetExportsFromTag ¶
func GetPreviousVersionTag ¶
func GetSDKRepo ¶
func GetSDKRepo(sdkRepoParam, sdkRepoURL string) (repo.SDKRepository, error)
func GetSpecCommit ¶
func GetSpecRpName ¶
get swagger rp folder name from autorest.md file
func InterfaceToAnyFilter ¶
func MarshalUnmarshalFilter ¶
func NonExportedFilter ¶
func PageableFilter ¶
PageableFilter PageableFilter after OperationFilter
func ReadV2ModuleNameToGetNamespace ¶
func ReadV2ModuleNameToGetNamespace(path string) (map[string][]PackageInfo, error)
reads from readme.go.md, parses the `track2` section to get module and package name
func ReplaceNewClientNamePlaceholder ¶
replace `{{NewClientName}}` placeholder in README.md by first func name according to `^New.+Method$` pattern
func ReplaceVersion ¶
replace version: use `module-version: ` prefix to locate version in autorest.md file, use version = "v*.*.*" regrex to locate version in constants.go file
func UpdateModuleDefinition ¶
Types ¶
type GenerateContext ¶
type GenerateContext struct { SDKPath string SDKRepo *repo.SDKRepository SpecPath string SpecCommitHash string SpecReadmeFile string SpecReadmeGoFile string SpecRepoURL string UpdateSpecVersion bool }
func (*GenerateContext) GenerateForAutomation ¶
func (ctx *GenerateContext) GenerateForAutomation(readme, repo, goVersion string) ([]GenerateResult, []error)
func (*GenerateContext) GenerateForSingleRPNamespace ¶
func (ctx *GenerateContext) GenerateForSingleRPNamespace(generateParam *GenerateParam) (*GenerateResult, error)
type GenerateParam ¶
type GenerateResult ¶
type PackageInfo ¶
type PullRequestLabel ¶
type PullRequestLabel string
const ( StableLabel PullRequestLabel = "Stable" BetaLabel PullRequestLabel = "Beta" FirstGALabel PullRequestLabel = "FirstGA" FirstGABreakingChangeLabel PullRequestLabel = "FirstGA,BreakingChange" FirstBetaLabel PullRequestLabel = "FirstBeta" StableBreakingChangeLabel PullRequestLabel = "Stable,BreakingChange" BetaBreakingChangeLabel PullRequestLabel = "Beta,BreakingChange" )
func CalculateNewVersion ¶
func CalculateNewVersion(changelog *model.Changelog, previousVersion string, isCurrentPreview bool) (*semver.Version, PullRequestLabel, error)
calculate new version by changelog using semver package