Repository policy plugin BETA
The Bitbucket Cloud repository policy plugin allows you to easily manage and enforce repository settings at any scope: workspace, project, or repository.
import {const configure: (config: Config | (() => Config)) => voidconfigure} from "flowie.app"
import {const repositoryPolicy: OptionsPluginNoDefault<RepositoryPolicyPluginOptions, false>repositoryPolicy} from "flowie.app/plugins"
function configure(config: Config | (() => Config)): voidconfigure({
Config.plugins?: PluginDef<unknown>[] | undefinedplugins: [
function repositoryPolicy(options: RepositoryPolicyPluginOptions): PluginDef<RepositoryPolicyPluginOptions> (+1 overload)repositoryPolicy({
private?: boolean | undefinedSet the repository as private.
See
https://support.atlassian.com/bitbucket-cloud/docs/set-repository-privacy-and-forking-options/private: true,
forkPolicy?: "no_forks" | "allow_forks" | "no_public_forks" | undefinedSet forking permissions.
See
https://support.atlassian.com/bitbucket-cloud/docs/set-repository-privacy-and-forking-options/forkPolicy: "no_forks",
enforceSignedCommits?: boolean | undefinedPrevents non-signed commits from being pushed to the repo.
*Requires Bitbucket Premium plan
See
https://support.atlassian.com/bitbucket-cloud/docs/require-signed-commits/enforceSignedCommits: true,
}),
],
})
The configuration reference can be found here.
Enforced values
These options will still be editable in the repository settings UI, however, if they are changed, Flowie will revert them to the defined value.
Flowie will also ensure that when a new repository is created under the configured workspace or project; even if the options are not selected during creation, it will be enabled after the creation.