Sbt-github-packages: Flag to disable "undefined key" warning

Created on 14 Feb 2020  ·  6Comments  ·  Source: djspiewak/sbt-github-packages

First: Thanks a lot for this plugin @djspiewak!

I do have a very small request: Would it be possible to disable the warning if githubOwner and githubRepository isn't set?

https://github.com/djspiewak/sbt-github-packages/blob/8f2a34883e33fc6d63aa7e9b8198e1f00b869258/src/main/scala/sbtghpackages/GitHubPackagesPlugin.scala#L67-L68

I do get your point why you print this warning, and of course it can stay the default, however if I use the plugin solely to retrieve packages from private repositories (which are libraries for our main project), we do not want to publish to this repositories from within our main project. Setting github-actor and token is enough for such a case. Therefore this warning is very annoying and also can cause problems in CI/CD pipelines.

I am not 100% sure how such a flag should be called. Maybe it should not be about the warning, but more about the purpose how the plugin is used. E.g. notPublishing := true, fetchOnly := true, readOnly := true, publishing := false (which is true by default), repoOnly := true or something like that.

What do you think?

Most helpful comment

I'm completely okay with suppressing the warning. I'd say something like githubSuppressPublicationWarning := true or something like that. WDYT?

All 6 comments

I'm completely okay with suppressing the warning. I'd say something like githubSuppressPublicationWarning := true or something like that. WDYT?

Sounds great to me! Thanks!

Any chance we see this in the next release? Thanks!

Definitely if I can get to it! Sorry been really swamped. It's not a hard thing to do, just… time. :-( I'll make an 0.4.2 for it though if I can get it done soon.

Okay actually this was really easy. Done and released.

Nice, thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

djspiewak picture djspiewak  ·  23Comments

dcsobral picture dcsobral  ·  11Comments

bmjsmith picture bmjsmith  ·  28Comments

hartleys picture hartleys  ·  6Comments

tixxit picture tixxit  ·  16Comments