Skip to content

Commit

Permalink
Merge pull request #847 from imjasonh/use-github
Browse files Browse the repository at this point in the history
default --use-github=true
  • Loading branch information
imjasonh authored Nov 16, 2023
2 parents e891848 + 95c104a commit edb20bf
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/md/melange_convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Convert is an EXPERIMENTAL COMMAND - Attempts to convert packages/gems/apkbuild
--additional-repositories stringArray additional repositories to be added to convert environment config
-h, --help help for convert
-o, --out-dir string directory where convert config will be output (default ".")
--use-github **experimental** if true, tries to use github to figure out the release commit details (python only for now). To prevent rate limiting, you can set the GITHUB_TOKEN env variable to a github token.
--use-github **experimental** if true, tries to use github to figure out the release commit details (python only for now). To prevent rate limiting, you can set the GITHUB_TOKEN env variable to a github token. (default true)
--use-relmon **experimental** if true, tries to use release-monitoring to fetch release monitoring data.
--wolfi-defaults if true, adds wolfi repo, and keyring to config (default true)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/md/melange_convert_apkbuild.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ melange convert apkbuild [flags]
--additional-keyrings stringArray additional repositories to be added to convert environment config
--additional-repositories stringArray additional repositories to be added to convert environment config
-o, --out-dir string directory where convert config will be output (default ".")
--use-github **experimental** if true, tries to use github to figure out the release commit details (python only for now). To prevent rate limiting, you can set the GITHUB_TOKEN env variable to a github token.
--use-github **experimental** if true, tries to use github to figure out the release commit details (python only for now). To prevent rate limiting, you can set the GITHUB_TOKEN env variable to a github token. (default true)
--use-relmon **experimental** if true, tries to use release-monitoring to fetch release monitoring data.
--wolfi-defaults if true, adds wolfi repo, and keyring to config (default true)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/md/melange_convert_gem.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ convert gem fluentd
--additional-keyrings stringArray additional repositories to be added to convert environment config
--additional-repositories stringArray additional repositories to be added to convert environment config
-o, --out-dir string directory where convert config will be output (default ".")
--use-github **experimental** if true, tries to use github to figure out the release commit details (python only for now). To prevent rate limiting, you can set the GITHUB_TOKEN env variable to a github token.
--use-github **experimental** if true, tries to use github to figure out the release commit details (python only for now). To prevent rate limiting, you can set the GITHUB_TOKEN env variable to a github token. (default true)
--use-relmon **experimental** if true, tries to use release-monitoring to fetch release monitoring data.
--wolfi-defaults if true, adds wolfi repo, and keyring to config (default true)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/md/melange_convert_python.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ convert python botocore
--additional-keyrings stringArray additional repositories to be added to convert environment config
--additional-repositories stringArray additional repositories to be added to convert environment config
-o, --out-dir string directory where convert config will be output (default ".")
--use-github **experimental** if true, tries to use github to figure out the release commit details (python only for now). To prevent rate limiting, you can set the GITHUB_TOKEN env variable to a github token.
--use-github **experimental** if true, tries to use github to figure out the release commit details (python only for now). To prevent rate limiting, you can set the GITHUB_TOKEN env variable to a github token. (default true)
--use-relmon **experimental** if true, tries to use release-monitoring to fetch release monitoring data.
--wolfi-defaults if true, adds wolfi repo, and keyring to config (default true)
```
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func Convert() *cobra.Command {

// Experimental flag to see if we can fetch github repo details and use that
// in pipeline to fetch instead of the ftp.
cmd.PersistentFlags().BoolVar(&c.useGithub, "use-github", false, "**experimental** if true, tries to use github to figure out the release commit details (python only for now). To prevent rate limiting, you can set the GITHUB_TOKEN env variable to a github token.")
cmd.PersistentFlags().BoolVar(&c.useGithub, "use-github", true, "**experimental** if true, tries to use github to figure out the release commit details (python only for now). To prevent rate limiting, you can set the GITHUB_TOKEN env variable to a github token.")

cmd.AddCommand(
ApkBuild(),
Expand Down
3 changes: 2 additions & 1 deletion pkg/cli/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func PythonBuild() *cobra.Command {
convert python botocore`,
Args: cobra.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
if len(args) != 1 {
return errors.New("too many arguments, expected only 1")
}
Expand All @@ -60,7 +61,7 @@ convert python botocore`,
if err != nil {
return err
}
o.ghClient, err = getGithubClient(context.TODO(), cmd)
o.ghClient, err = getGithubClient(ctx, cmd)
if err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion pkg/convert/python/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ func (c *PythonContext) generatePipeline(ctx context.Context, pack Package, vers
With: map[string]string{
"repository": ghVersion.Repo,
"tag": ghVersion.TagPrefix + "${{package.version}}",
"README": fmt.Sprintf("for version %s, if you use this, update the package.version above to this version", ghVersion.Tag),
"expected-commit": ghVersion.SHA,
}})
}
Expand Down

0 comments on commit edb20bf

Please sign in to comment.