sbt-typelevel icon indicating copy to clipboard operation
sbt-typelevel copied to clipboard

Tweak the publication condition to prevent publishing from forked repos

Open danicheg opened this issue 8 months ago • 3 comments

One might argue that users can use githubWorkflowPublishCond to prevent publishing from forked repos. Sure, but I’m confident this condition should be the default. Adding it manually to the build of dozens of projects isn’t exactly ideal, either. This is basically the same as what we did in #720, but adding the same SBT setting again just feels a bit extra to me 🤷🏻

danicheg avatar Apr 06 '25 11:04 danicheg

I was just thinking again about adding a dedicated SBT setting for the fork condition. Maybe introducing githubWorkflowForkCondition with a default value of github.event.repository.fork == false isn't such a bad idea — especially if we deprecate the tlCiForkCondition and substitute its default with the newly added githubWorkflowForkCondition. WDYT?

danicheg avatar Apr 06 '25 11:04 danicheg

I think it is a good idea not to publish from forks by default, but I can envision situations where users legitimately would want to do so, so I don't think it should be disabled without a way to re-enable it. A dedicated sbt setting seems reasonable to me.

bpholt avatar Apr 14 '25 23:04 bpholt

Any chance we'd merge this?

danicheg avatar Sep 13 '25 13:09 danicheg