-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateRepo.js
More file actions
129 lines (129 loc) · 3.8 KB
/
createRepo.js
File metadata and controls
129 lines (129 loc) · 3.8 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
module.exports = {
name: "createRepo",
ns: "github",
async: true,
description: "Create Repository",
phrases: {
active: "Creating repository {{input.name}}"
},
ports: {
input: {
github: {
title: "Github",
async: true,
type: "function",
fn: function __GITHUB__(data, source, state, input, $, output) {
var r = function() {
var repo = $.github.getRepo($.user, $.name);
$.options.name = $.name;
repo.createRepo($.options, function(err, result) {
if (err) {
output({
error: $.create(err)
});
} else {
output({
out: $.create(result)
});
}
});
}.call(this);
return {
state: state,
return: r
};
}
},
name: {
title: "The name of the repository",
type: "string"
},
options: {
type: "object",
title: "Options",
properties: {
description: {
title: "Description",
type: "string",
description: "A short description of the repository",
required: false
},
homepage: {
title: "Homepage",
type: "string",
description: "URL with more information about the repository",
required: false
},
auto_init: {
title: "Auto Init",
type: "boolean",
description: "Pass true to create an initial commit with empty README.",
"default": false
},
license_template: {
title: "License",
description: "Desired LICENSE template to apply.",
type: "string",
"enum": ["apache",
"affero",
"artistic",
"gpl",
"lgpl",
"mit",
"mozilla"
],
"default": "mit"
},
"private": {
title: "Private",
type: "boolean",
description: "Either true to create a private repository, or false to create a public one. Creating private repositories requires a paid GitHub account.",
"default": false
},
has_issues: {
title: "Issues",
type: "boolean",
description: "Either true to enable issues for this repository, false to disable them.",
"default": true
},
has_wiki: {
title: "Wiki",
type: "boolean",
description: "Either true to enable the wiki for this repository, false to disable it.",
"default": true
},
has_downloads: {
title: "Downloads",
type: "boolean",
description: "Either true to enable downloads for this repository, false to disable them.",
"default": true
},
team_id: {
title: "Team",
type: "number",
description: "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.",
required: false
},
gitignore_template: {
title: "Auto Init",
type: "string",
description: "Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, “Haskell”. Ignored if the auto_init parameter is not provided.",
required: false
}
}
}
},
output: {
error: {
title: "Error",
type: "object"
},
out: {
title: "Result",
type: "object"
}
}
},
state: {},
on: {}
}