Merge pull request #29518 from Bonial-International-GmbH/pjungermann/bitbucket/repo-updated-event

catalog/bitbucket-cloud: support repo:updated events
This commit is contained in:
Fredrik Adelöw
2025-04-22 13:16:36 +02:00
committed by GitHub
10 changed files with 2092 additions and 812 deletions
File diff suppressed because one or more lines are too long
+47 -2
View File
@@ -70,6 +70,30 @@ export namespace Events {
html: Models.Link;
}
// (undocumented)
export interface RepoChange<T> {
// (undocumented)
new: T;
// (undocumented)
old: T;
}
// (undocumented)
export interface RepoChanges {
// (undocumented)
description?: RepoChange<string>;
// (undocumented)
full_name?: RepoChange<string>;
// (undocumented)
language?: RepoChange<string>;
// (undocumented)
links?: RepoChange<
Pick<Models.RepositoryLinks, 'avatar' | 'html' | 'self'>
>;
// (undocumented)
name?: RepoChange<string>;
// (undocumented)
website?: RepoChange<string>;
}
// (undocumented)
export interface RepoEvent {
// (undocumented)
actor: Models.Account;
@@ -88,6 +112,11 @@ export namespace Events {
// (undocumented)
push: RepoPush;
}
// (undocumented)
export interface RepoUpdatedEvent extends RepoEvent {
// (undocumented)
changes: RepoChanges;
}
}
// @public (undocumented)
@@ -106,8 +135,6 @@ export namespace Models {
// (undocumented)
links?: AccountLinks;
// (undocumented)
username?: string;
// (undocumented)
uuid?: string;
}
export interface AccountLinks {
@@ -125,6 +152,8 @@ export namespace Models {
// (undocumented)
author?: Author;
// (undocumented)
committer?: Committer;
// (undocumented)
date?: string;
// (undocumented)
hash?: string;
@@ -163,6 +192,9 @@ export namespace Models {
readonly MergeCommit: 'merge_commit';
readonly Squash: 'squash';
readonly FastForward: 'fast_forward';
readonly SquashFastForward: 'squash_fast_forward';
readonly RebaseFastForward: 'rebase_fast_forward';
readonly RebaseMerge: 'rebase_merge';
};
export type BranchMergeStrategiesEnum =
(typeof BranchMergeStrategiesEnum)[keyof typeof BranchMergeStrategiesEnum];
@@ -195,6 +227,11 @@ export namespace Models {
// (undocumented)
export type CommitFileAttributesEnum =
(typeof CommitFileAttributesEnum)[keyof typeof CommitFileAttributesEnum];
export interface Committer extends ModelObject {
raw?: string;
// (undocumented)
user?: Account;
}
export interface Link {
// (undocumented)
href?: string;
@@ -416,6 +453,8 @@ export namespace Models {
export interface Workspace extends ModelObject {
// (undocumented)
created_on?: string;
forking_mode?: WorkspaceForkingModeEnum;
is_privacy_enforced?: boolean;
is_private?: boolean;
// (undocumented)
links?: WorkspaceLinks;
@@ -425,6 +464,12 @@ export namespace Models {
updated_on?: string;
uuid?: string;
}
const WorkspaceForkingModeEnum: {
readonly AllowForks: 'allow_forks';
readonly InternalOnly: 'internal_only';
};
export type WorkspaceForkingModeEnum =
(typeof WorkspaceForkingModeEnum)[keyof typeof WorkspaceForkingModeEnum];
// (undocumented)
export interface WorkspaceLinks {
// (undocumented)
@@ -30,6 +30,29 @@ export namespace Events {
push: RepoPush;
}
/** @public */
export interface RepoUpdatedEvent extends RepoEvent {
changes: RepoChanges;
}
/** @public */
export interface RepoChanges {
description?: RepoChange<string>;
full_name?: RepoChange<string>;
language?: RepoChange<string>;
links?: RepoChange<
Pick<Models.RepositoryLinks, 'avatar' | 'html' | 'self'>
>;
name?: RepoChange<string>;
website?: RepoChange<string>;
}
/** @public */
export interface RepoChange<T> {
new: T;
old: T;
}
/** @public */
export interface RepoPush {
changes: Change[];
@@ -36,7 +36,6 @@ export namespace Models {
created_on?: string;
display_name?: string;
links?: AccountLinks;
username?: string;
uuid?: string;
}
@@ -67,6 +66,7 @@ export namespace Models {
*/
export interface BaseCommit extends ModelObject {
author?: Author;
committer?: Committer;
date?: string;
hash?: string;
message?: string;
@@ -139,6 +139,9 @@ export namespace Models {
MergeCommit: 'merge_commit',
Squash: 'squash',
FastForward: 'fast_forward',
SquashFastForward: 'squash_fast_forward',
RebaseFastForward: 'rebase_fast_forward',
RebaseMerge: 'rebase_merge',
} as const;
/**
@@ -193,6 +196,18 @@ export namespace Models {
export type CommitFileAttributesEnum =
(typeof CommitFileAttributesEnum)[keyof typeof CommitFileAttributesEnum];
/**
* The committer of a change in a repository
* @public
*/
export interface Committer extends ModelObject {
/**
* The raw committer value from the repository. This may be the only value available if the committer does not match a user in Bitbucket.
*/
raw?: string;
user?: Account;
}
/**
* A link to a resource related to this object.
* @public
@@ -242,6 +257,28 @@ export namespace Models {
values?: Array<TResultItem> | Set<TResultItem>;
}
/**
* A paginated list of branches.
* @public
*/
export interface PaginatedBranches extends Paginated<Branch> {
/**
* The values of the current page.
*/
values?: Set<Branch>;
}
/**
* A paginated list of projects
* @public
*/
export interface PaginatedProjects extends Paginated<Project> {
/**
* The values of the current page.
*/
values?: Set<Project>;
}
/**
* A paginated list of repositories.
* @public
@@ -253,17 +290,6 @@ export namespace Models {
values?: Set<Repository>;
}
/**
* A paginated list of projects.
* @public
*/
export interface PaginatedProjects extends Paginated<Project> {
/**
* The values of the current page.
*/
values?: Set<Project>;
}
/**
* A paginated list of workspaces.
* @public
@@ -275,17 +301,6 @@ export namespace Models {
values?: Set<Workspace>;
}
/**
* A paginated list of branches.
* @public
*/
export interface PaginatedBranches extends Paginated<Branch> {
/**
* The values of the current page.
*/
values?: Set<Branch>;
}
/**
* Object describing a user's role on resources like commits or pull requests.
* @public
@@ -571,6 +586,17 @@ export namespace Models {
*/
export interface Workspace extends ModelObject {
created_on?: string;
/**
* Controls the rules for forking repositories within this workspace.
*
* * **allow_forks**: unrestricted forking
* * **internal_only**: prevents forking of private repositories outside the workspace or to public repositories
*/
forking_mode?: WorkspaceForkingModeEnum;
/**
* Indicates whether the workspace enforces private content, or whether it allows public content.
*/
is_privacy_enforced?: boolean;
/**
* Indicates whether the workspace is publicly accessible, or whether it is
* private to the members and consequently only visible to members.
@@ -592,6 +618,28 @@ export namespace Models {
uuid?: string;
}
/**
* Controls the rules for forking repositories within this workspace.
*
* * **allow_forks**: unrestricted forking
* * **internal_only**: prevents forking of private repositories outside the workspace or to public repositories
* @public
*/
export const WorkspaceForkingModeEnum = {
AllowForks: 'allow_forks',
InternalOnly: 'internal_only',
} as const;
/**
* Controls the rules for forking repositories within this workspace.
*
* * **allow_forks**: unrestricted forking
* * **internal_only**: prevents forking of private repositories outside the workspace or to public repositories
* @public
*/
export type WorkspaceForkingModeEnum =
(typeof WorkspaceForkingModeEnum)[keyof typeof WorkspaceForkingModeEnum];
/**
* @public
*/