Basic checks plugins
Flowie also provides the same Bitbucket basic checks.
import {const configure: (config: Config | (() => Config)) => voidconfigure} from "flowie.app"
import {
function noChangesRequested(): PluginDef<boolean> (+2 overloads)Users get notified if pull requests have ‘Changes requested’ associated with
any of the reviewers.noChangesRequested,
function noUnresolvedTasks(): PluginDef<boolean> (+2 overloads)Users get notified when they have open pull request tasksnoUnresolvedTasks,
const minimumBuilds: OptionsPluginNoDefault<MinimumBuildsPluginsOptions, false>minimumBuilds,
const minimumApprovals: OptionsPluginNoDefault<MinimumApprovalsPluginsOptions, false>Users get notified when pull requests don't have that number of approvalsminimumApprovals,
const minimumApprovalsDefaultReviewers: OptionsPluginNoDefault<MinimumApprovalsPluginsOptions, false>Users get notified when pull requests don't have that number of approvals
from default reviewers.minimumApprovalsDefaultReviewers,
function maximumCommitsBehind(number: number): PluginDef<number> (+1 overload)Users get notified when a branch is behind the maximum number of commits
compared to the destination branch.maximumCommitsBehind,
} from "flowie.app/plugins"
// Hoover plugins below for more info
function configure(config: Config | (() => Config)): voidconfigure({
Config.plugins?: PluginDef<unknown>[] | undefinedplugins: [
function noChangesRequested(): PluginDef<boolean> (+2 overloads)Users get notified if pull requests have ‘Changes requested’ associated with
any of the reviewers.noChangesRequested(),
function noUnresolvedTasks(): PluginDef<boolean> (+2 overloads)Users get notified when they have open pull request tasksnoUnresolvedTasks(),
function minimumBuilds(options: MinimumBuildsPluginsOptions): PluginDef<MinimumBuildsPluginsOptions> (+1 overload)minimumBuilds(1),
function minimumApprovals(options: MinimumApprovalsPluginsOptions): PluginDef<MinimumApprovalsPluginsOptions> (+1 overload)Users get notified when pull requests don't have that number of approvalsminimumApprovals(2),
function minimumApprovalsDefaultReviewers(options: MinimumApprovalsPluginsOptions): PluginDef<MinimumApprovalsPluginsOptions> (+1 overload)Users get notified when pull requests don't have that number of approvals
from default reviewers.minimumApprovalsDefaultReviewers(2),
function maximumCommitsBehind(number: number): PluginDef<number> (+1 overload)Users get notified when a branch is behind the maximum number of commits
compared to the destination branch.maximumCommitsBehind(2),
],
})
Additional functionality
In addition to the standard functionality from merge checks, Flowie approvals checks also provides additional configurations:
Count authors approval
By default, the author’s approval does not count towards the required approvals,
but you change this behavior using countAuthorApproval
import {const configure: (config: Config | (() => Config)) => voidconfigure} from "flowie.app"
import {const minimumApprovals: OptionsPluginNoDefault<MinimumApprovalsPluginsOptions, false>Users get notified when pull requests don't have that number of approvalsminimumApprovals} from "flowie.app/plugins"
function configure(config: Config | (() => Config)): voidconfigure({
Config.plugins?: PluginDef<unknown>[] | undefinedplugins: [function minimumApprovals(options: MinimumApprovalsPluginsOptions): PluginDef<MinimumApprovalsPluginsOptions> (+1 overload)Users get notified when pull requests don't have that number of approvalsminimumApprovals({require: numberrequire: 2, countAuthorApproval?: boolean | undefinedcountAuthorApproval: true})],
})
Count stale approvals
By default, stale approvals are not counted.
countStaleApproval controls this setting.
import {const configure: (config: Config | (() => Config)) => voidconfigure} from "flowie.app"
import {const minimumApprovals: OptionsPluginNoDefault<MinimumApprovalsPluginsOptions, false>Users get notified when pull requests don't have that number of approvalsminimumApprovals} from "flowie.app/plugins"
function configure(config: Config | (() => Config)): voidconfigure({
Config.plugins?: PluginDef<unknown>[] | undefinedplugins: [function minimumApprovals(options: MinimumApprovalsPluginsOptions): PluginDef<MinimumApprovalsPluginsOptions> (+1 overload)Users get notified when pull requests don't have that number of approvalsminimumApprovals({require: numberrequire: 3, countStaleApproval: truecountStaleApproval: true})],
})
Require all reviewers
You can also require that any reviewers
added to the pull request have to approve it using the requireAllReviewers.
In the example below, it requires at least two approvals, one optionally being from the author. However, if a third reviewer is added, it will require their approval as well.
import {const configure: (config: Config | (() => Config)) => voidconfigure} from "flowie.app"
import {const minimumApprovals: OptionsPluginNoDefault<MinimumApprovalsPluginsOptions, false>Users get notified when pull requests don't have that number of approvalsminimumApprovals} from "flowie.app/plugins"
function configure(config: Config | (() => Config)): voidconfigure({
Config.plugins?: PluginDef<unknown>[] | undefinedplugins: [
function minimumApprovals(options: MinimumApprovalsPluginsOptions): PluginDef<MinimumApprovalsPluginsOptions> (+1 overload)Users get notified when pull requests don't have that number of approvalsminimumApprovals({
require: numberrequire: 2,
countAuthorApproval?: boolean | undefinedcountAuthorApproval: true,
requireAllReviewers: truerequireAllReviewers: true,
}),
],
})
Build checks customization NEW
By default, minimumBuilds
will check for the minimum passing, no pending and no failed builds.
However, you can enable or disable these checks individually:
import {const configure: (config: Config | (() => Config)) => voidconfigure} from "flowie.app"
import {const minimumBuilds: OptionsPluginNoDefault<MinimumBuildsPluginsOptions, false>minimumBuilds} from "flowie.app/plugins"
function configure(config: Config | (() => Config)): voidconfigure({
Config.plugins?: PluginDef<unknown>[] | undefinedplugins: [
function minimumBuilds(options: MinimumBuildsPluginsOptions): PluginDef<MinimumBuildsPluginsOptions> (+1 overload)minimumBuilds({
require: numberrequire: 1,
// Will not check for failed builds
noFailed?: boolean | undefinednoFailed: false,
noPending?: boolean | undefinednoPending: true,
}),
],
})
Also,
note that when 0 is specified for minimum required builds, it turns of all the checks by default.