bb project¶
Create and change projects, and the settings their repositories inherit
30 commands.
bb project branch-restriction- Create, list, update and delete the branch restrictions of a project (5 commands)
bb project create- Create a new project
bb project default-task- Add, list, update and delete the tasks each pull request in a project starts with (4 commands)
bb project delete- Delete a project
bb project get- Get project details
bb project list- List projects
bb project permissions- Grant, list and revoke project permissions (10 commands)
bb project update- Update project details
bb project webhook- Create, list, test and change a project's webhooks (6 commands)
bb project branch-restriction¶
Create, list, update and delete the branch restrictions of a project
create- Create a new project-level restriction
delete- Delete a project restriction
get- Get details of a single branch restriction
list- List all project branch restrictions
update- Update an existing restriction
bb project branch-restriction create¶
Create a new project-level restriction
bb project branch-restriction create <project-key> [flags]
# Nobody deletes main, in any repository of the project
bb project branch-restriction create PROJ --type no-deletes --matcher-id refs/heads/main
# Only pull requests change release branches, except for one group
bb project branch-restriction create PROJ --type pull-request-only \
--matcher-type PATTERN --matcher-id 'release/*' --group release-managers
# The branches the branching model calls hotfixes, or its development branch
bb project branch-restriction create PROJ --type no-deletes \
--matcher-type MODEL_CATEGORY --matcher-id HOTFIX
bb project branch-restriction create PROJ --type fast-forward-only \
--matcher-type MODEL_BRANCH --matcher-id development
--access-key-id ints- Allowed SSH access key IDs
--group strings- Allowed group names
--matcher-id string- Matcher id value
--matcher-type string- Matcher type (one of: BRANCH, MODEL_BRANCH, MODEL_CATEGORY, PATTERN) (default "BRANCH")
--type string- Restriction type (one of: read-only, no-deletes, fast-forward-only, pull-request-only, no-creates)
--user strings- Allowed user slugs
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
project string Project key the restriction is on.
restriction object
id? integer Restriction identifier, which get,
update and delete address.
type? read-only|no-deletes|fast-forward-only|pull-request-only|no-creates What the restriction forbids: read-only,
no-deletes, fast-forward-only,
pull-request-only or no-creates.
matcher? object Which refs the restriction applies to.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
users? list of object Users exempt from the restriction.
id? integer User identifier.
name? string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes
it.
slug? string URL-safe form of the username.
type? string Account kind: NORMAL for a person,
SERVICE for an integration account.
active boolean Whether the account is enabled.
groups? list of string Groups exempt from the restriction.
accessKeys? list of object SSH access keys exempt from the
restriction.
id? integer Access key identifier.
label? string Label the key was registered under.
fingerprint? string Fingerprint of the public key.
permission? string Access level the key is granted.
scope? PROJECT|REPOSITORY PROJECT when the restriction is set on
the project, REPOSITORY when on the
repository itself.
bb project branch-restriction delete¶
Delete a project restriction
bb project branch-restriction delete <project-key> <restriction-id> [flags]
# By the id bb project branch-restriction list prints
bb project branch-restriction delete PROJ 7
-y, --yes- Confirm without being asked
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Project key the restriction was on.
restrictionId string Identifier of the restriction that was deleted, as it was given on the command line.
bb project branch-restriction get¶
Get details of a single branch restriction
bb project branch-restriction get <project-key> <restriction-id>
# One restriction, by id
bb project branch-restriction get PROJ 7
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
project string Project key the restriction is on.
restriction object
id? integer Restriction identifier, which get,
update and delete address.
type? read-only|no-deletes|fast-forward-only|pull-request-only|no-creates What the restriction forbids: read-only,
no-deletes, fast-forward-only,
pull-request-only or no-creates.
matcher? object Which refs the restriction applies to.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
users? list of object Users exempt from the restriction.
id? integer User identifier.
name? string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes
it.
slug? string URL-safe form of the username.
type? string Account kind: NORMAL for a person,
SERVICE for an integration account.
active boolean Whether the account is enabled.
groups? list of string Groups exempt from the restriction.
accessKeys? list of object SSH access keys exempt from the
restriction.
id? integer Access key identifier.
label? string Label the key was registered under.
fingerprint? string Fingerprint of the public key.
permission? string Access level the key is granted.
scope? PROJECT|REPOSITORY PROJECT when the restriction is set on
the project, REPOSITORY when on the
repository itself.
bb project branch-restriction list¶
List all project branch restrictions
bb project branch-restriction list <project-key> [flags]
# The restrictions every repository of the project inherits
bb project branch-restriction list PROJ
# Only the ones that stop pushes without a pull request
bb project branch-restriction list PROJ --type pull-request-only
--matcher-id string- Filter by matcher ID value
--matcher-type string- Filter by matcher type (one of: BRANCH, MODEL_BRANCH, MODEL_CATEGORY, PATTERN)
--type string- Filter by restriction type (one of: read-only, no-deletes, fast-forward-only, pull-request-only, no-creates)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
project string Project key the restrictions are on.
restrictions list of object or null Branch restrictions on the project.
id? integer Restriction identifier, which get,
update and delete address.
type? read-only|no-deletes|fast-forward-only|pull-request-only|no-creates What the restriction forbids: read-only,
no-deletes, fast-forward-only,
pull-request-only or no-creates.
matcher? object Which refs the restriction applies to.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
users? list of object Users exempt from the restriction.
id? integer User identifier.
name? string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes
it.
slug? string URL-safe form of the username.
type? string Account kind: NORMAL for a person,
SERVICE for an integration account.
active boolean Whether the account is enabled.
groups? list of string Groups exempt from the restriction.
accessKeys? list of object SSH access keys exempt from the
restriction.
id? integer Access key identifier.
label? string Label the key was registered under.
fingerprint? string Fingerprint of the public key.
permission? string Access level the key is granted.
scope? PROJECT|REPOSITORY PROJECT when the restriction is set on
the project, REPOSITORY when on the
repository itself.
bb project branch-restriction update¶
Update an existing restriction
bb project branch-restriction update <project-key> <restriction-id> [flags]
# Replace a restriction: what it restricts, where, and who is exempt
bb project branch-restriction update PROJ 7 --type no-deletes \
--matcher-type BRANCH --matcher-id refs/heads/main --user alice
--access-key-id ints- Allowed SSH access key IDs
--group strings- Allowed group names
--matcher-id string- Matcher id value
--matcher-type string- Matcher type (one of: BRANCH, MODEL_BRANCH, MODEL_CATEGORY, PATTERN)
--type string- Restriction type (one of: read-only, no-deletes, fast-forward-only, pull-request-only, no-creates)
--user strings- Allowed user slugs
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
project string Project key the restriction is on.
restriction object
id? integer Restriction identifier, which get,
update and delete address.
type? read-only|no-deletes|fast-forward-only|pull-request-only|no-creates What the restriction forbids: read-only,
no-deletes, fast-forward-only,
pull-request-only or no-creates.
matcher? object Which refs the restriction applies to.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
users? list of object Users exempt from the restriction.
id? integer User identifier.
name? string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes
it.
slug? string URL-safe form of the username.
type? string Account kind: NORMAL for a person,
SERVICE for an integration account.
active boolean Whether the account is enabled.
groups? list of string Groups exempt from the restriction.
accessKeys? list of object SSH access keys exempt from the
restriction.
id? integer Access key identifier.
label? string Label the key was registered under.
fingerprint? string Fingerprint of the public key.
permission? string Access level the key is granted.
scope? PROJECT|REPOSITORY PROJECT when the restriction is set on
the project, REPOSITORY when on the
repository itself.
bb project create¶
Create a new project
bb project create <project-key> [flags]
# Create a project
bb project create PROJ --name "Payments" --description "Payment services"
--description string- Project description
--name string- Project name (required)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
project object
id? integer Project identifier.
key? string Project key, which every other project command takes.
name? string Display name.
description? string Description, when one was given.
public boolean Whether the project is readable without authentication.
type? NORMAL|PERSONAL NORMAL for an ordinary project, PERSONAL for a user's own.
scope? string What the object is, when the instance reports it.
bb project default-task¶
Add, list, update and delete the tasks each pull request in a project starts with
add- Add a default checklist task
delete- Delete a default checklist task
list- List all default checklist tasks for the project
update- Update a default checklist task
bb project default-task add¶
Add a default checklist task
bb project default-task add <project-key> <description> [flags]
# A task every new pull request in the project starts with
bb project default-task add PROJ "Update the changelog"
# Only for pull requests from a feature branch into main
bb project default-task add PROJ "Update the changelog" \
--source-ref 'feature/*' --target-ref main
--source-ref string- Source ref to match; a glob matches as a pattern, anything else as a branch (default: any ref)
--target-ref string- Target ref to match; a glob matches as a pattern, anything else as a branch (default: any ref)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
id? integer Task identifier, which update and delete
address.
description? string The task text, which appears on every
pull request the matchers cover.
sourceMatcher? object Which source branches the task applies
to; type ANY_REF when it applies to all
of them.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
targetMatcher? object Which target branches the task applies
to; type ANY_REF when it applies to all
of them.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
scope? PROJECT|REPOSITORY PROJECT when the task is set on the
project, and a repository inherits it;
REPOSITORY when it is set on the
repository itself.
bb project default-task delete¶
Delete a default checklist task
bb project default-task delete <project-key> <task-id> [flags]
# By the id bb project default-task list prints
bb project default-task delete PROJ 3
-y, --yes- Confirm without being asked
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Project key the task was on.
id string Identifier of the task that was deleted, as it was given on the command line.
bb project default-task list¶
List all default checklist tasks for the project
bb project default-task list <project-key>
# The tasks every new pull request in the project starts with
bb project default-task list PROJ
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data list of object
id? integer Task identifier, which update and delete
address.
description? string The task text, which appears on every
pull request the matchers cover.
sourceMatcher? object Which source branches the task applies
to; type ANY_REF when it applies to all
of them.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
targetMatcher? object Which target branches the task applies
to; type ANY_REF when it applies to all
of them.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
scope? PROJECT|REPOSITORY PROJECT when the task is set on the
project, and a repository inherits it;
REPOSITORY when it is set on the
repository itself.
bb project default-task update¶
Update a default checklist task
bb project default-task update <project-key> <task-id> [flags]
# Reword a task
bb project default-task update PROJ 3 --description "Update CHANGELOG.md"
--description string- New task description
--source-ref string- New source ref to match; a glob matches as a pattern, anything else as a branch (default: any ref)
--target-ref string- New target ref to match; a glob matches as a pattern, anything else as a branch (default: any ref)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
id? integer Task identifier, which update and delete
address.
description? string The task text, which appears on every
pull request the matchers cover.
sourceMatcher? object Which source branches the task applies
to; type ANY_REF when it applies to all
of them.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
targetMatcher? object Which target branches the task applies
to; type ANY_REF when it applies to all
of them.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
scope? PROJECT|REPOSITORY PROJECT when the task is set on the
project, and a repository inherits it;
REPOSITORY when it is set on the
repository itself.
bb project delete¶
Delete a project
bb project delete <project-key> [flags]
# Delete a project
bb project delete PROJ
-y, --yes- Confirm without being asked
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Key of the project that was deleted.
bb project get¶
Get project details
bb project get <project-key>
# A project's name, description and visibility
bb project get PROJ
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
project object
id? integer Project identifier.
key? string Project key, which every other project command takes.
name? string Display name.
description? string Description, when one was given.
public boolean Whether the project is readable without authentication.
type? NORMAL|PERSONAL NORMAL for an ordinary project, PERSONAL for a user's own.
scope? string What the object is, when the instance reports it.
bb project list¶
List projects
bb project list [flags]
# The projects you can see
bb project list
# The ones whose name matches
bb project list --name pay
--all- Return every result rather than the first --limit
--limit int- Maximum number of results to return (default 25)
--name string- Filter projects by name
--start int- Start offset for list operations
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
projects list of object or null Matching projects.
id? integer Project identifier.
key? string Project key, which every other project command takes.
name? string Display name.
description? string Description, when one was given.
public boolean Whether the project is readable without authentication.
type? NORMAL|PERSONAL NORMAL for an ordinary project, PERSONAL for a user's own.
scope? string What the object is, when the instance reports it.
bb project permissions¶
Grant, list and revoke project permissions
grant- Grant a project permission to a user or group
groups grant- Grant a project permission to a group
groups list- List groups with project permissions
groups revoke- Revoke a project permission from a group
list- List users or groups with project permissions
revoke- Revoke a project permission from a user or group
show- Show the caller's effective permissions on a project
users grant- Grant a project permission to a user
users list- List users with project permissions
users revoke- Revoke a project permission from a user
bb project permissions grant¶
Grant a project permission to a user or group
bb project permissions grant <project-key> <user-or-group> <permission> [flags]
Grant a project permission to a user, or to a group with --group.
Shallow alias for bb project permissions {users,groups} grant.
# Let a user write to every repository of a project
bb project permissions grant PROJ alice PROJECT_WRITE
# A group instead
bb project permissions grant PROJ backend-team PROJECT_WRITE --group
--group- Treat the argument as a group rather than a user
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Project key the permission was granted on.
subject user|group user or group, matching what name refers to.
name string Username or group name that was granted the permission.
permission PROJECT_READ|PROJECT_WRITE|PROJECT_ADMIN
bb project permissions groups¶
Grant, list and revoke the project permissions of a group
bb project permissions groups grant¶
Grant a project permission to a group
bb project permissions groups grant <project-key> <group> <permission>
Also available as bb project permissions grant --group, one level shallower.
# Let a group write to every repository of a project
bb project permissions groups grant PROJ backend-team PROJECT_WRITE
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Project key the permission was granted on.
subject user|group user or group, matching what name refers to.
name string Username or group name that was granted the permission.
permission PROJECT_READ|PROJECT_WRITE|PROJECT_ADMIN
bb project permissions groups list¶
List groups with project permissions
bb project permissions groups list <project-key> [flags]
Also available as bb project permissions list --group, one level shallower.
# The groups with a permission on a project
bb project permissions groups list PROJ
--all- Return every result rather than the first --limit
--limit int- Maximum number of results to return (default 100)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
project string Project key the permissions are on.
subject user|group user when the entries are users, group when they are groups.
entries list of object or null Holders of a project permission.
name string Username for a user, group name for a group.
displayName? string Human-readable name.
permission? PROJECT_READ|PROJECT_WRITE|PROJECT_ADMIN
bb project permissions groups revoke¶
Revoke a project permission from a group
bb project permissions groups revoke <project-key> <group> [flags]
Also available as bb project permissions revoke --group, one level shallower.
# Take a group's permission on a project away
bb project permissions groups revoke PROJ backend-team
-y, --yes- Confirm without being asked
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Project key the permission was revoked on.
subject user|group user or group, matching what name refers to.
name string Username or group name the permission was revoked from.
bb project permissions list¶
List users or groups with project permissions
bb project permissions list <project-key> [flags]
List users with project permissions, or groups with --group.
Shallow alias for bb project permissions {users,groups} list.
# The users with a permission on a project
bb project permissions list PROJ
# The groups
bb project permissions list PROJ --group
--all- Return every result rather than the first --limit
--group- List groups instead of users
--limit int- Maximum number of results to return (default 100)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
project string Project key the permissions are on.
subject user|group user when the entries are users, group when they are groups.
entries list of object or null Holders of a project permission.
name string Username for a user, group name for a group.
displayName? string Human-readable name.
permission? PROJECT_READ|PROJECT_WRITE|PROJECT_ADMIN
bb project permissions revoke¶
Revoke a project permission from a user or group
bb project permissions revoke <project-key> <user-or-group> [flags]
Revoke a project permission from a user, or from a group with --group.
Shallow alias for bb project permissions {users,groups} revoke.
# Take a user's permission on a project away
bb project permissions revoke PROJ alice
# A group's
bb project permissions revoke PROJ backend-team --group
--group- Treat the argument as a group rather than a user
-y, --yes- Confirm without being asked
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Project key the permission was revoked on.
subject user|group user or group, matching what name refers to.
name string Username or group name the permission was revoked from.
bb project permissions show¶
Show the caller's effective permissions on a project
bb project permissions show <project-key>
# What you yourself may do in a project
bb project permissions show PROJ
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
project string Project key the permissions were probed on.
permissions list of object or null One entry per permission level, in increasing order of
privilege.
permission PROJECT_READ|PROJECT_WRITE|PROJECT_ADMIN
granted boolean Whether the caller holds it.
bb project permissions users¶
Grant, list and revoke the project permissions of a user
bb project permissions users grant¶
Grant a project permission to a user
bb project permissions users grant <project-key> <username> <permission>
Also available as bb project permissions grant, one level shallower.
# Let a user write to every repository of a project
bb project permissions users grant PROJ alice PROJECT_WRITE
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Project key the permission was granted on.
subject user|group user or group, matching what name refers to.
name string Username or group name that was granted the permission.
permission PROJECT_READ|PROJECT_WRITE|PROJECT_ADMIN
bb project permissions users list¶
List users with project permissions
bb project permissions users list <project-key> [flags]
Also available as bb project permissions list, one level shallower.
# The users with a permission on a project
bb project permissions users list PROJ
--all- Return every result rather than the first --limit
--limit int- Maximum number of results to return (default 100)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
project string Project key the permissions are on.
subject user|group user when the entries are users, group when they are groups.
entries list of object or null Holders of a project permission.
name string Username for a user, group name for a group.
displayName? string Human-readable name.
permission? PROJECT_READ|PROJECT_WRITE|PROJECT_ADMIN
bb project permissions users revoke¶
Revoke a project permission from a user
bb project permissions users revoke <project-key> <username> [flags]
Also available as bb project permissions revoke, one level shallower.
# Take a user's permission on a project away
bb project permissions users revoke PROJ alice
-y, --yes- Confirm without being asked
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Project key the permission was revoked on.
subject user|group user or group, matching what name refers to.
name string Username or group name the permission was revoked from.
bb project update¶
Update project details
bb project update <project-key> [flags]
# Rename a project
bb project update PROJ --name "Payments platform"
--description string- Project description
--name string- Project name
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
project object
id? integer Project identifier.
key? string Project key, which every other project command takes.
name? string Display name.
description? string Description, when one was given.
public boolean Whether the project is readable without authentication.
type? NORMAL|PERSONAL NORMAL for an ordinary project, PERSONAL for a user's own.
scope? string What the object is, when the instance reports it.
bb project webhook¶
Create, list, test and change a project's webhooks
create- Create a new project-level webhook
delete- Delete a project webhook
list- List all webhooks configured for the project
stats- Retrieve execution statistics
test- Trigger a connection test ping
update- Update a project webhook
bb project webhook create¶
Create a new project-level webhook
bb project webhook create <project-key> <name> <url> [flags]
# Call an endpoint when anything is pushed to a repository of the project
bb project webhook create PROJ ci https://ci.example.com/hooks/bitbucket
# On pull request events, signed with a shared secret read from stdin
printf '%s' "$WEBHOOK_SECRET" | bb project webhook create PROJ reviews \
https://ci.example.com/hooks/reviews --event pr:opened --event pr:merged --secret-stdin
--active- Whether the webhook is active (default true)
--credentials-password-stdin- Read the endpoint password from stdin (or set BB_WEBHOOK_PASSWORD)
--credentials-username string- Username Bitbucket authenticates to the endpoint with
--event strings- Webhook events to subscribe to (default [repo:refs_changed])
--secret-stdin- Read the shared secret from stdin (or set BB_WEBHOOK_SECRET)
--ssl-verification string- Whether Bitbucket verifies the endpoint's TLS certificate, left as the server has it when omitted (one of: true, false)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Project key the webhook is on.
webhook object
id? integer Webhook identifier, which get, update and delete address.
name? string Webhook name.
url? string Endpoint Bitbucket posts to.
active boolean Whether the webhook currently fires.
events? list of string Event keys the webhook subscribes to, for example repo:refs_changed.
sslVerificationRequired? boolean Whether Bitbucket verifies the endpoint's TLS certificate.
scopeType? string Where the webhook is configured: repository or project.
secretConfigured boolean Whether a shared secret is configured.
credentialsUsername? string Username Bitbucket authenticates to the endpoint with.
secret? string The shared secret in plaintext.
created boolean Whether a webhook was created.
bb project webhook delete¶
Delete a project webhook
bb project webhook delete <project-key> <webhook-id> [flags]
# By the id bb project webhook list prints
bb project webhook delete PROJ 12
-y, --yes- Confirm without being asked
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Project key the webhook was on.
webhookId string Identifier of the webhook that was deleted, as it was given on the command line.
bb project webhook list¶
List all webhooks configured for the project
bb project webhook list <project-key> [flags]
# The webhooks every repository of the project has
bb project webhook list PROJ
--all- Return every result rather than the first --limit
--limit int- Maximum number of results to return (default 25)
--start int- Start offset for list operations
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
project string Project key the webhooks are on.
webhooks list of object or null Webhooks configured on the project.
id? integer Webhook identifier, which get, update and delete address.
name? string Webhook name.
url? string Endpoint Bitbucket posts to.
active boolean Whether the webhook currently fires.
events? list of string Event keys the webhook subscribes to, for example
repo:refs_changed.
sslVerificationRequired? boolean Whether Bitbucket verifies the endpoint's TLS certificate.
scopeType? string Where the webhook is configured: repository or project.
secretConfigured boolean Whether a shared secret is configured.
credentialsUsername? string Username Bitbucket authenticates to the endpoint with.
secret? string The shared secret in plaintext.
bb project webhook stats¶
Retrieve execution statistics
bb project webhook stats <project-key> <webhook-id> [flags]
# The delivery statistics of a webhook
bb project webhook stats PROJ 12
# The summary only
bb project webhook stats PROJ 12 --summary
--summary- Get statistics summary instead of detailed logs
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json: its data has no shape bb can promise: returns whatever the statistics endpoint answered, untyped, and prints it without reading a field
bb project webhook test¶
Trigger a connection test ping
bb project webhook test <project-key> <webhook-id> [flags]
# Send a test ping to a webhook's endpoint
bb project webhook test PROJ 12
# To another URL, before pointing the webhook at it
bb project webhook test PROJ 12 --url https://ci.example.com/hooks/new
--reveal-secret- Print the endpoint credentials Bitbucket sent instead of redacting it
--url string- Test this URL instead of the webhook's configured one
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json: its data has no shape bb can promise: returns whatever the webhook endpoint answered, untyped, and prints it without reading a field
bb project webhook update¶
Update a project webhook
bb project webhook update <project-key> <webhook-id> [flags]
# Point a webhook at a new endpoint
bb project webhook update PROJ 12 --url https://ci.example.com/hooks/new
# Replace the events it fires on
bb project webhook update PROJ 12 --event pr:opened --event pr:merged
# Switch it off without deleting it
bb project webhook update PROJ 12 --active false
# Have Bitbucket sign in to the endpoint, with the password read from stdin
printf '%s' "$ENDPOINT_PASSWORD" | bb project webhook update PROJ 12 \
--credentials-username bitbucket --credentials-password-stdin
--active string- Active status (one of: true, false)
--credentials-password-stdin- Read the endpoint password from stdin (or set BB_WEBHOOK_PASSWORD)
--credentials-username string- Username Bitbucket authenticates to the endpoint with
--event strings- New list of webhook events
--name string- New name
--no-credentials- Remove the endpoint credentials from the webhook
--no-secret- Remove the shared secret from the webhook
--secret-stdin- Read the shared secret from stdin (or set BB_WEBHOOK_SECRET)
--ssl-verification string- Whether Bitbucket verifies the endpoint's TLS certificate, left as the server has it when omitted (one of: true, false)
--url string- New URL
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
project string Project key the webhook is on.
webhook object
id? integer Webhook identifier, which get, update and delete address.
name? string Webhook name.
url? string Endpoint Bitbucket posts to.
active boolean Whether the webhook currently fires.
events? list of string Event keys the webhook subscribes to, for example repo:refs_changed.
sslVerificationRequired? boolean Whether Bitbucket verifies the endpoint's TLS certificate.
scopeType? string Where the webhook is configured: repository or project.
secretConfigured boolean Whether a shared secret is configured.
credentialsUsername? string Username Bitbucket authenticates to the endpoint with.
secret? string The shared secret in plaintext.