RFR: 1352: Configure GithubHost as offline [v2]

Erik Joelsson erikj at openjdk.java.net
Thu Feb 17 14:28:22 UTC 2022

> As a followup to [SKARA-1344](https://bugs.openjdk.java.net/browse/SKARA-1344), to better support the notifier to act through a mirror, we need another configuration option. When configuring a forge for the "originalrepository" option, we need to make it possible to not need to make any remote calls to that forge.
> Currently, when Skara creates a HostedRepository from a forge, it will always make a call to validate and initiate things. At least for GithubRepositories, this call isn't strictly necessary (and one could argue that it should be possible to get around this for Gitlab as well). Most callers for Forge::repository do expect this validation however, so we do not want to change the default behavior.
> I propose adding a new configure parameter to github forge, "offline", which defaults to false. If set to true, then it indicates that this forge is expected to be offline and the caller is not expected to try to perform any remote operations. This concept could certainly be expanded, but for now, the only thing we explicitly need to prevent is that validation/initialization when creating a repository. I would rather not spend more time implementing a more complete feature that is unlikely to be used.

Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision:

  Remove null cast


  - all: https://git.openjdk.java.net/skara/pull/1287/files
  - new: https://git.openjdk.java.net/skara/pull/1287/files/cd0dcd8f..3be90724

 - full: https://webrevs.openjdk.java.net/?repo=skara&pr=1287&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=skara&pr=1287&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/skara/pull/1287.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/1287/head:pull/1287

PR: https://git.openjdk.java.net/skara/pull/1287

More information about the skara-dev mailing list