Fix Trigger Setup Robot Permissions for Private Base (#2543)
This commit is contained in:
parent
2f757faa40
commit
581d7c67a7
5 changed files with 210 additions and 91 deletions
104
static/js/types/common.types.ts
Normal file
104
static/js/types/common.types.ts
Normal file
|
@ -0,0 +1,104 @@
|
|||
import { ViewArray } from '../services/view-array/view-array';
|
||||
|
||||
|
||||
/**
|
||||
* A type representing local application data.
|
||||
*/
|
||||
export type Local = {
|
||||
contexts?: string[];
|
||||
dockerContext?: string;
|
||||
dockerfileLocations?: any;
|
||||
dockerfilePath?: string;
|
||||
hasValidContextLocation?: boolean;
|
||||
hasValidDockerfilePath?: boolean;
|
||||
maxScore?: number;
|
||||
namespaceOptions?: {
|
||||
filter: string;
|
||||
predicate: string;
|
||||
reverse: boolean;
|
||||
page: number;
|
||||
};
|
||||
namespaces?: Namespace[];
|
||||
orderedNamespaces?: ViewArray;
|
||||
orderedRepositories?: ViewArray;
|
||||
orderedRobotAccounts?: ViewArray;
|
||||
repositories?: Repository[];
|
||||
repositoryFullRefs?: {
|
||||
icon: string;
|
||||
title: string;
|
||||
value: string;
|
||||
}[];
|
||||
repositoryOptions?: {
|
||||
filter: string;
|
||||
predicate: string;
|
||||
reverse: boolean;
|
||||
page: number;
|
||||
hideStale: boolean;
|
||||
};
|
||||
repositoryRefs?: {
|
||||
kind: string;
|
||||
name: string;
|
||||
}[];
|
||||
robotAccount?: RobotAccount;
|
||||
robotOptions?: {
|
||||
filter: string;
|
||||
predicate: string;
|
||||
reverse: boolean;
|
||||
page: number;
|
||||
};
|
||||
selectedNamespace?: Namespace;
|
||||
selectedRepository?: Repository;
|
||||
triggerAnalysis?: any;
|
||||
triggerOptions?: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* A type representing a robot account.
|
||||
*/
|
||||
export type RobotAccount = {
|
||||
can_read: boolean;
|
||||
is_robot: boolean;
|
||||
kind: string;
|
||||
name: string;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* A type representing a Git repository.
|
||||
*/
|
||||
export type Repository = {
|
||||
description: string;
|
||||
full_name: string;
|
||||
has_admin_permissions: boolean;
|
||||
last_updated: number;
|
||||
last_updated_datetime: Date;
|
||||
name: string;
|
||||
private: boolean;
|
||||
url: string;
|
||||
namespace?: string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A type representing a repository namespace.
|
||||
*/
|
||||
export type Namespace = {
|
||||
avatar_url: string;
|
||||
id: string;
|
||||
personal: boolean;
|
||||
score: number;
|
||||
title: string;
|
||||
url: string;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* A type representing a trigger.
|
||||
*/
|
||||
export type Trigger = {
|
||||
id: number;
|
||||
service: any;
|
||||
};
|
Reference in a new issue