summaryrefslogtreecommitdiffstats
path: root/modules/migration/schemas/issue.json
blob: 25753c39e20d637dd092f087e869c113b136badd (plain)
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
104
105
106
107
108
109
110
111
112
113
114
{
    "title": "Issue",
    "description": "Issues associated to a repository within a forge (Gitea, GitLab, etc.).",

    "type": "array",
    "items": {
	"type": "object",
	"additionalProperties": false,
	"properties": {
	    "number": {
		"description": "Unique identifier, relative to the repository.",
		"type": "number"
	    },
	    "poster_id": {
		"description": "Unique identifier of the user who authored the issue.",
		"type": "number"
	    },
	    "poster_name": {
		"description": "Name of the user who authored the issue.",
		"type": "string"
	    },
	    "poster_email": {
		"description": "Email of the user who authored the issue.",
		"type": "string"
	    },
	    "title": {
		"description": "Short description displayed as the title.",
		"type": "string"
	    },
	    "content": {
		"description": "Long, multiline, description.",
		"type": "string"
	    },
	    "ref": {
		"description": "Target branch in the repository.",
		"type": "string"
	    },
	    "milestone": {
		"description": "Name of the milestone.",
		"type": "string"
	    },
	    "state": {
		"description": "A 'closed' issue will not see any activity in the future, otherwise it is 'open'.",
		"enum": [
		    "closed",
		    "open"
		]
	    },
	    "is_locked": {
		"description": "A locked issue can only be modified by privileged users.",
		"type": "boolean"
	    },
	    "created": {
		"description": "Creation time.",
		"type": "string",
		"format": "date-time"
	    },
	    "updated": {
		"description": "Last update time.",
		"type": "string",
		"format": "date-time"
	    },
	    "closed": {
		"description": "The last time 'state' changed to 'closed'.",
		"anyOf": [
		    {
			"type": "string",
			"format": "date-time"
		    },
		    {
			"type": "null"
		    }
		]
	    },
	    "labels": {
		"description": "List of labels.",
		"type": "array",
		"items": {
		    "$ref": "label.json"
		}
	    },
	    "reactions": {
		"description": "List of reactions.",
		"type": "array",
		"items": {
		    "$ref": "reaction.json"
		}
	    },
	    "assignees": {
		"description": "List of assignees.",
		"type": "array",
		"items": {
		    "description": "Name of a user assigned to the issue.",
		    "type": "string"
		}
	    }
	},
	"required": [
	    "number",
	    "poster_id",
	    "poster_name",
	    "title",
	    "content",
	    "state",
	    "is_locked",
	    "created",
	    "updated"
	]
    },

    "$schema": "http://json-schema.org/draft-04/schema#",
    "$id": "http://example.com/issue.json",
    "$$target": "issue.json"
}