| | |
| | | model.description = getConfig(config, "description", ""); |
| | | model.originRepository = getConfig(config, "originRepository", null); |
| | | model.addOwners(ArrayUtils.fromString(getConfig(config, "owner", ""))); |
| | | model.acceptNewPatchsets = getConfig(config, "acceptNewPatchsets", true); |
| | | model.acceptNewTickets = getConfig(config, "acceptNewTickets", true); |
| | | model.requireApproval = getConfig(config, "requireApproval", settings.getBoolean(Keys.tickets.requireApproval, false)); |
| | | model.useIncrementalPushTags = getConfig(config, "useIncrementalPushTags", false); |
| | | model.incrementalPushTagPrefix = getConfig(config, "incrementalPushTagPrefix", null); |
| | | model.allowForks = getConfig(config, "allowForks", true); |
| | |
| | | config.setString(Constants.CONFIG_GITBLIT, null, "description", repository.description); |
| | | config.setString(Constants.CONFIG_GITBLIT, null, "originRepository", repository.originRepository); |
| | | config.setString(Constants.CONFIG_GITBLIT, null, "owner", ArrayUtils.toString(repository.owners)); |
| | | config.setBoolean(Constants.CONFIG_GITBLIT, null, "acceptNewPatchsets", repository.acceptNewPatchsets); |
| | | config.setBoolean(Constants.CONFIG_GITBLIT, null, "acceptNewTickets", repository.acceptNewTickets); |
| | | if (settings.getBoolean(Keys.tickets.requireApproval, false) == repository.requireApproval) { |
| | | // use default |
| | | config.unset(Constants.CONFIG_GITBLIT, null, "requireApproval"); |
| | | } else { |
| | | // override default |
| | | config.setBoolean(Constants.CONFIG_GITBLIT, null, "requireApproval", repository.requireApproval); |
| | | } |
| | | config.setBoolean(Constants.CONFIG_GITBLIT, null, "useIncrementalPushTags", repository.useIncrementalPushTags); |
| | | if (StringUtils.isEmpty(repository.incrementalPushTagPrefix) || |
| | | repository.incrementalPushTagPrefix.equals(settings.getString(Keys.git.defaultIncrementalPushTagPrefix, "r"))) { |