-
Notifications
You must be signed in to change notification settings - Fork 681
Expand file tree
/
Copy pathChangeManagement.ts
More file actions
103 lines (87 loc) · 2.12 KB
/
ChangeManagement.ts
File metadata and controls
103 lines (87 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
/**
* Representation for a changes file
*/
export interface IChangeFile {
changes: IChangeInfo[];
packageName: string;
email: string | undefined;
}
/**
* Represents all of the types of change requests.
* @beta
*/
export enum ChangeType {
none = 0,
dependency = 1,
hotfix = 2,
patch = 3,
minor = 4,
major = 5
}
export interface IVersionPolicyChangeInfo {
/**
* Defines the type of change.
*/
changeType: ChangeType;
/**
* The new version for the version policy, as calculated by the findChangeRequests function.
*/
newVersion: string;
/**
* The name of the version policy.
*/
versionPolicyName: string;
}
/**
* Defines an IChangeInfo object.
*/
export interface IChangeInfo {
/**
* Defines the type of change. This is not expected to exist within the JSON file definition as we
* parse it from the "type" property.
*/
changeType?: ChangeType;
/**
* Defines the array of related changes for the given package. This is used to iterate over comments
* requested by the change requests.
*/
changes?: IChangeInfo[];
/**
* A user provided comment for the change.
*/
comment?: string;
/**
* An optional dictionary of custom string fields.
*/
customFields?: Record<string, string>;
/**
* The email of the user who provided the comment. Pulled from the Git log.
*/
author?: string;
/**
* The commit hash for the change.
*/
commit?: string;
/**
* The new downstream range dependency, as calculated by the findChangeRequests function.
*/
newRangeDependency?: string;
/**
* The new version for the package, as calculated by the findChangeRequests function.
*/
newVersion?: string;
/**
* The order in which the change request should be published.
*/
order?: number;
/**
* The name of the package.
*/
packageName: string;
/**
* The type of the package publishing request (patch/minor/major), as provided by the JSON file.
*/
type?: string;
}