Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default --use-github=true #847

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading