Interface AutoMergeSettingsService
public interface AutoMergeSettingsService
Service for managing pull request auto-merge settings.
- Since:
- 8.15
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanWhether auto-merge is globally enabled. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes the pull request auto-merge settings associated with a particularscope.getOrDefault(Scope scope) Retrieves the pull request auto-merge settings for a particularscope.set(AutoMergeSettingsCreateRequest request) Creates or updates the pull request auto-merge settings for a particularrepository scopeorproject scope.
-
Field Details
-
AUTO_MERGE_GLOBAL_ENABLED
static final boolean AUTO_MERGE_GLOBAL_ENABLEDWhether auto-merge is globally enabled.- See Also:
-
-
Method Details
-
delete
Deletes the pull request auto-merge settings associated with a particularscope.- Parameters:
scope- arepository scopeorproject scope- Throws:
AuthorisationException- when the currently authenticated user does not have at least admin permission for the provided scope, e.g.Permission.REPO_ADMINfor aRepositoryScopeorPermission.PROJECT_ADMINfor aProjectScopeArgumentValidationException- if the provided scope isglobal scopeForbiddenException- if the repository's project has restricted its auto-merge settings
-
getOrDefault
Retrieves the pull request auto-merge settings for a particularscope. If no settings are found, inherited settings are returned if they exist. Otherwise,globalpull request auto-merge settings are returned. If the provided scope is arepository scopeand the repository's project has restricted its auto-merge settings, then the project's auto-merge settings will be returned.- Parameters:
scope- arepository scopeorproject scope- Returns:
- pull request auto-merge settings for the provided scope
- Throws:
AuthorisationException- when the currently authenticated user does not have at least read permission for the provided scope, e.g.Permission.REPO_READfor aRepositoryScopeorPermission.PROJECT_VIEWfor aProjectScope
-
set
Creates or updates the pull request auto-merge settings for a particularrepository scopeorproject scope.- Parameters:
request- the request containing the pull request auto-merge settings- Returns:
- the created or updated pull request auto-merge settings
- Throws:
AuthorisationException- when the currently authenticated user does not have at least admin permission for the provided scope, e.g.Permission.REPO_ADMINfor aRepositoryScopeorPermission.PROJECT_ADMINfor aProjectScopeForbiddenException- if the repository's project has restricted its auto-merge settings
-