Skip to content

Commit 2a6a44f

Browse files
authored
add Azure DevOps schemas (#1)
Co-authored-by: ahacke <ahacke@users.noreply.github.com>
1 parent 039bff3 commit 2a6a44f

File tree

3 files changed

+183
-0
lines changed

3 files changed

+183
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ GH_REPOSITORY=exmaple-repository
5454

5555
`pnpm run dev`
5656

57+
## Addiotinal information
58+
59+
- Azure DevOps Rest API - Work Items - Get Work Item: https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/get-work-item?tabs=HTTP#get-work-item
60+
5761
## Todo
5862

5963
- [ ] Fix delete all issues (graphql mutation)

schemas/ado-bug.json

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
id: 11,
3+
rev: 1,
4+
fields: {
5+
'System.AreaPath': 'github-migration',
6+
'System.TeamProject': 'github-migration',
7+
'System.IterationPath': 'github-migration',
8+
'System.WorkItemType': 'Bug',
9+
'System.State': 'New',
10+
'System.Reason': 'New',
11+
'System.CreatedDate': '2023-07-29T10:28:13.787Z',
12+
'System.CreatedBy': {
13+
displayName: 'ahacke dev',
14+
url: 'https://spsprodweu5.vssps.visualstudio.com/1234/_apis/Identities/1234',
15+
_links: {
16+
avatar: {
17+
href: 'https://dev.azure.com/example-org/_apis/GraphProfile/MemberAvatars/example-avatar'
18+
}
19+
},
20+
id: '1234',
21+
uniqueName: 'random-unique-name',
22+
imageUrl: 'https://dev.azure.com/example-org/_apis/GraphProfile/MemberAvatars/example-avatar',
23+
descriptor: 'example-avatar'
24+
},
25+
'System.ChangedDate': '2023-07-29T10:28:13.787Z',
26+
'System.ChangedBy': {
27+
displayName: 'ahacke dev',
28+
url: 'https://spsprodweu5.vssps.visualstudio.com/1234/_apis/Identities/1234',
29+
_links: {
30+
avatar: {
31+
href: 'https://dev.azure.com/example-org/_apis/GraphProfile/MemberAvatars/example-avatar'
32+
}
33+
},
34+
id: '1234',
35+
uniqueName: 'random-unique-name',
36+
imageUrl: 'https://dev.azure.com/example-org/_apis/GraphProfile/MemberAvatars/example-avatar',
37+
descriptor: 'example-avatar'
38+
},
39+
'System.CommentCount': 0,
40+
'System.Title': 'My Bug (related)',
41+
'Microsoft.VSTS.Common.StateChangeDate': '2023-07-29T10:28:13.787Z',
42+
'Microsoft.VSTS.Common.Priority': 2,
43+
'Microsoft.VSTS.Common.Severity': '3 - Medium',
44+
'Microsoft.VSTS.Common.ValueArea': 'Business',
45+
'Microsoft.VSTS.TCM.ReproSteps': '<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br> </div>',
46+
'System.Parent': 9
47+
},
48+
relations: [
49+
{
50+
rel: 'System.LinkTypes.Related',
51+
url: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/10',
52+
attributes: {
53+
isLocked: false,
54+
name: 'Related'
55+
}
56+
},
57+
{
58+
rel: 'System.LinkTypes.Hierarchy-Reverse',
59+
url: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/9',
60+
attributes: {
61+
isLocked: false,
62+
name: 'Parent'
63+
}
64+
}
65+
],
66+
_links: {
67+
self: {
68+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/11'
69+
},
70+
workItemUpdates: {
71+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/11/updates'
72+
},
73+
workItemRevisions: {
74+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/11/revisions'
75+
},
76+
workItemComments: {
77+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/11/comments'
78+
},
79+
html: {
80+
href: 'https://dev.azure.com/example-org/1234/_workitems/edit/11'
81+
},
82+
workItemType: {
83+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/workItemTypes/Bug'
84+
},
85+
fields: {
86+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/fields'
87+
}
88+
},
89+
url: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/11'
90+
}

schemas/ado-user-story.json

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
id: 10,
3+
rev: 1,
4+
fields: {
5+
'System.AreaPath': 'github-migration',
6+
'System.TeamProject': 'github-migration',
7+
'System.IterationPath': 'github-migration',
8+
'System.WorkItemType': 'User Story',
9+
'System.State': 'New',
10+
'System.Reason': 'New',
11+
'System.CreatedDate': '2023-07-29T10:26:59.84Z',
12+
'System.CreatedBy': {
13+
displayName: 'ahacke dev',
14+
url: 'https://spsprodweu5.vssps.visualstudio.com/1234/_apis/Identities/example-id',
15+
_links: {
16+
avatar: {
17+
href: 'https://dev.azure.com/example-org/_apis/GraphProfile/MemberAvatars/example-avatar'
18+
}
19+
},
20+
id: 'example-id',
21+
uniqueName: 'random-unique-name',
22+
imageUrl: 'https://dev.azure.com/example-org/_apis/GraphProfile/MemberAvatars/example-avatar',
23+
descriptor: 'example-avatar'
24+
},
25+
'System.ChangedDate': '2023-07-29T10:26:59.84Z',
26+
'System.ChangedBy': {
27+
displayName: 'ahacke dev',
28+
url: 'https://spsprodweu5.vssps.visualstudio.com/Afab54532-8484-4389-861e-a6dab0cd49af/_apis/Identities/example-id',
29+
_links: {
30+
avatar: {
31+
href: 'https://dev.azure.com/example-org/_apis/GraphProfile/MemberAvatars/example-avatar'
32+
}
33+
},
34+
id: 'example-id',
35+
uniqueName: 'random-unique-name',
36+
imageUrl: 'https://dev.azure.com/example-org/_apis/GraphProfile/MemberAvatars/',
37+
descriptor: 'example-avatar'
38+
},
39+
'System.CommentCount': 0,
40+
'System.Title': 'User Story (related)',
41+
'Microsoft.VSTS.Common.StateChangeDate': '2023-07-29T10:26:59.84Z',
42+
'Microsoft.VSTS.Common.Priority': 2,
43+
'Microsoft.VSTS.Common.ValueArea': 'Business',
44+
'System.Description': '<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br> </div>',
45+
'System.Parent': 9
46+
},
47+
relations: [
48+
{
49+
rel: 'System.LinkTypes.Related',
50+
url: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/11',
51+
attributes: {
52+
isLocked: false,
53+
name: 'Related'
54+
}
55+
},
56+
{
57+
rel: 'System.LinkTypes.Hierarchy-Reverse',
58+
url: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/9',
59+
attributes: {
60+
isLocked: false,
61+
name: 'Parent'
62+
}
63+
}
64+
],
65+
_links: {
66+
self: {
67+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/10'
68+
},
69+
workItemUpdates: {
70+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/10/updates'
71+
},
72+
workItemRevisions: {
73+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/10/revisions'
74+
},
75+
workItemComments: {
76+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/10/comments'
77+
},
78+
html: {
79+
href: 'https://dev.azure.com/example-org/1234/_workitems/edit/10'
80+
},
81+
workItemType: {
82+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/workItemTypes/User%20Story'
83+
},
84+
fields: {
85+
href: 'https://dev.azure.com/example-org/1234/_apis/wit/fields'
86+
}
87+
},
88+
url: 'https://dev.azure.com/example-org/1234/_apis/wit/workItems/10'
89+
}

0 commit comments

Comments
 (0)