forked from videojs/video.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contrib.json
270 lines (257 loc) · 13.9 KB
/
contrib.json
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
{
"project": {
"owner": "videojs",
"name": "video.js",
"requirements": [
{
"name": "git",
"info": "http://git-scm.com"
},
{
"name": "node.js",
"info": "http://nodejs.org"
}
],
"urls": {
"git": "https://github.com/videojs/video.js.git",
"repo_api": "https://api.github.com/repos/videojs/video.js",
"repo_ui": "https://github.com/videojs/video.js"
},
"branches": {
"development": "master",
"release": "stable"
}
},
"install": [
[ "git fetch origin", "Get all git branches" ],
[ "git checkout -b stable origin/stable", "Create the stable branch for patches" ],
[ "git remote add upstream {{project.urls.git}}", "Add the upstream project as a remote for pulling changes" ],
[ "git fetch upstream", "Get all upstream branches and changes" ],
{ "include": "update all" }
],
"update": {
"all": [
{ "include": "update stable" },
{ "include": "update master" },
[ "npm install", "Download dependencies"],
[ "grunt", "Build the library" ]
],
"master": [
[ "git checkout master", "Switch to the development branch" ],
[ "git pull upstream master", "Get any changes to master in the main project" ],
[ "git push origin master", "Push any changes to your copy of the main project" ]
],
"stable": [
[ "git checkout stable", "Switch to the release branch" ],
[ "git pull upstream stable", "Get any changes to stable in the main project" ],
[ "git push origin stable", "Push any changes to your copy of the main project" ]
]
},
"test": [ "grunt test" ],
"watch": [ "grunt watch" ],
"server": [ "grunt connect" ],
"feature": {
"desc": "Create a new feature or general enhancement",
"baseBranch": "master",
"start": {
"desc": "Start a new feature",
"steps": [
{ "include": "update {{project.branches.development}}" },
{ "include": "branch start" }
]
},
"submit": {
"desc": "Submit a pull request for a feature when it's finished",
"steps": [
{ "include": "branch submit" }
]
},
"delete": {
"desc": "Delete the current feature branch",
"steps": [
{ "include": "branch delete" }
]
},
"accept": {
"steps": [
{ "include": "update {{project.branches.development}}" },
{ "include": "pull_request accept" }
]
}
},
"patch": {
"desc": "Create an urgent fix for the latest stable version",
"baseBranch": "stable",
"new": {
"alias": "start",
"desc": "Start a new patch",
"finished": "Make your changes and then run `contrib patch submit`",
"steps": [
{ "include": "update {{project.branches.release}}" },
{ "include": "branch start" }
]
},
"submit": {
"desc": "Submit a pull request for a patch when it's finished",
"steps": [
{ "include": "branch submit" }
]
},
"delete": {
"desc": "Delete the current patch branch",
"steps": [
{ "include": "branch delete" }
]
},
"accept": {
"steps": [
{ "include": "update {{project.branches.release}}" },
{ "include": "pull_request accept" }
]
}
},
"report": {
"desc": "Submit a bug report",
"steps": [
{ "prompt": "text", "desc": "Create a title that is descriptive of the problem", "id": "title" },
{ "prompt": "text", "desc": "What did you do? (steps to reproduce)", "id": "reproduce" },
{ "prompt": "text", "desc": "What did you expect to happen?", "id": "expected" },
{ "prompt": "text", "desc": "What actually happened?", "id": "actual" },
{ "prompt": "text", "desc": "What version of video.js are you using?", "id": "version" },
{ "prompt": "text", "desc": "Are you using any video.js plugins?", "id": "plugins" },
{ "prompt": "text", "desc": "What browsers/platforms did you experience this in (e.g. Win 7, IE10; Android 4, Chrome;)?", "id": "browsers" },
{ "prompt": "text", "desc": "Is there a URL to a live example, or a jsbin (e.g. http://jsbin.com/axedog/9999/edit)?", "id": "example" },
{ "prompt": "text", "desc": "Are there any other details you'd like to provide?", "id": "details" },
{ "open": "{{project.urls.repo_ui}}/issues/new?title={{title}}&body=**Steps to reproduce:**\n> {{reproduce}}\n\n**What was expected:**\n> {{expected}}\n\n**What Happened:**\n> {{actual}}\n\n**Video.js Version:**\n> {{version}}\n\n**Plugins:**\n> {{plugins}}\n\n**Browsers experienced on:**\n> {{browsers}}\n\n**Example:**\n> {{example}}\n\n**Other details:**\n> {{details}}" }
],
"finished": "Thanks for submitting a bug report! One of our contributors will address it as soon as possible."
},
"request": {
"desc": "Submit a feature/enhancement request",
"steps": [
{ "prompt": "text", "desc": "Create a title that is descriptive of the enhancement", "id": "title" },
{ "prompt": "text", "desc": "Describe the feature/enhancement (be as detailed as possible so it's clear who, why, and how it would be used)", "id": "describe" },
{ "prompt": "text", "desc": "Is there any existing documentation or related specifications?", "id": "docs" },
{ "prompt": "text", "desc": "Are there any existing examples?", "id": "examples" },
{ "confirm": "You will be redirected to Github where you can submit this issue, OK?" },
{ "open": "{{project.urls.repo_ui}}/issues/new?title={{ title }}&body=**Describe the feature/enhancement:**\n> {{ describe }}\n\n**Existing docs/specs:**\n> {{ docs }}\n\n**Existing examples:**\n> {{ examples }}" }
],
"finished": "Thanks for submitting a feature request! One of our contributors will address it as soon as possible."
},
"release": {
"desc": "Create and publish a release",
"steps": [
[ "git diff --exit-code", "Ensure there's no unadded changes" ],
[ "git diff --cached --exit-code", "Ensure there's no added changes" ],
{ "confirm": "Have the changes been merged into the release branch (stable)?" },
{
"id": "type",
"desc": "Provide the release type",
"prompt": {
"message": "release type",
"default": "patch",
"type": "text"
}
},
[ "git checkout stable", "Checkout the release branch" ],
[ "git pull upstream stable", "Update the release branch" ],
[ "grunt test", "Run tests" ],
[ "grunt chg-release:{{ type }}", "Update the changelog with the new release" ],
[ "grunt version:{{ type }}", "Bump package versions" ],
[ "grunt", "Build the release" ],
[ "git add dist/video-js --force", "Add the (otherwise ignored) release files" ],
[ "grunt vjsdocs", "Rebuild the docs" ],
[ "grunt cdn-links", "Update the cdn urls in the docs" ],
[ "grunt tagrelease", "Tag the release" ],
[ "git push upstream stable", "Push changes to the remote" ],
[ "git push upstream --tags", "Push tags to the remote" ],
[ "npm publish", "Publish to npm" ],
[ "git checkout master", "Checkout the development branch" ],
[ "git pull upstream master", "Update the development branch" ],
[ "git merge stable", "Merge changes" ],
[ "grunt clean:dist", "Remove built dist files to re-ignore them" ],
[ "git add -u", "Add the changes for the removed dist files" ],
[ "git commit -m 'Removed dist files'", "Commit the removed dist files" ],
[ "git push upstream master", "Push development branch changes" ]
]
},
"branch": {
"private": true,
"start": {
"steps": [
{ "prompt": "Name the branch", "id": "name" },
[ "git checkout -b {{name}} {{baseBranch}}", "Create the branch" ],
[ "git push -u origin {{name}}", "Push the branch to your remote copy of the project" ]
]
},
"submit": {
"desc": "Submit a pull request for when the change is finished",
"steps": [
{ "exec": "git diff --exit-code", "desc": "Test for unadded changes {{ args.[0] }}", "fail": "Make sure all changes have been added and committed, or stashed, before switching branches" },
{ "exec": "git diff --cached --exit-code", "desc": "Test for uncommitted changes", "fail": "Make sure all changes have been added and committed, or stashed, before switching branches" },
{ "include": "test" },
{ "exec": "git rev-parse --abbrev-ref HEAD", "desc": "Get the current branch", "id": "branch" },
{ "confirm": "Are you sure {{branch}} is the branch you want to submit?" },
{ "prompt": "Which github user or org are you submitting from?", "id": "user" },
{ "open": "{{project.urls.repo_ui}}/compare/videojs:{{baseBranch}}...{{user}}:{{branch}}", "desc": "Open the github pull request page" }
]
},
"delete": {
"desc": "Delete the current branch",
"steps": [
{ "exec": "git rev-parse --abbrev-ref HEAD", "desc": "Get the current branch name", "id": "name" },
{ "confirm": "Are you sure '{{name}}' is the branch you want to delete?" },
{ "exec": "git branch -D {{name}}", "desc": "Delete the local copy of the branch" },
{ "exec": "git push origin :{{name}}", "desc": "Delete the remote copy of the branch" }
]
}
},
"pull_request": {
"private": true,
"review": {
"steps": [
{ "prompt": "What is the the pull request number?", "id": "prNum" },
{ "get": "{{project.urls.repo_api}}/pulls/{{prNum}}", "desc": "Get the PR information", "id": "pr" },
[ "git fetch {{pr.head.repo.ssh_url}} {{pr.head.ref}}", "Get the pull request changes but don't merge them" ],
[ "git merge-base master FETCH_HEAD", "Get the common ancestor commit", "base" ],
[ "git checkout -b review-{{pr.user.login}}-{{pr.head.ref}} {{base}}", "Create a new local branch for the pull request that has a base of the common commit" ],
[ "git merge FETCH_HEAD", "Merge in the pull request changes" ],
[ "grunt test", "Build and run tests" ]
]
},
"modify": {
"desc": "Submit a modification to an existing pull request",
"steps": [
{ "exec": "git diff --exit-code", "desc": "Test for unadded changes", "fail": "Make sure all changes have been added and committed before submitting changes" },
{ "exec": "git diff --cached --exit-code", "desc": "Test for uncommitted changes", "fail": "Make sure all changes have been committed before submitting changes" },
{ "include": "test" },
{ "exec": "git rev-parse --abbrev-ref HEAD", "desc": "Get the current branch", "id": "branch" },
{ "confirm": "Are you sure {{branch}} is the branch you want to submit?" },
{ "prompt": "Which github user or org are you submitting from?", "id": "user" },
{ "prompt": "What is the the pull request number?", "id": "prNum" },
{ "get": "{{project.urls.repo_api}}/pulls/{{prNum}}", "desc": "Get the PR information", "id": "pr" },
{ "exec": "git push -u origin {{branch}}", "desc": "Push the changes to the remote repo" },
{ "open": "https://github.com/{{user}}/video.js/compare/{{pr.head.label}}...{{user}}:{{branch}}", "desc": "Open the github pull request page" }
]
},
"accept": [
{ "prompt": "What is the the pull request number?", "id": "prNum" },
{ "get": "{{project.urls.repo_api}}/pulls/{{prNum}}", "desc": "Get the PR information", "id": "pr" },
{ "get": "{{project.urls.repo_api}}/pulls/{{prNum}}/commits", "desc": "Get the PR commits to access author info", "id": "prCommits" },
[ "git checkout -b {{pr.user.login}}-{{pr.head.ref}} {{pr.base.ref}}", "Create a new branch for merging the changes" ],
[ "git fetch {{pr.head.repo.ssh_url}} {{pr.head.ref}}", "Fetch the changes" ],
[ "git merge --no-commit --squash FETCH_HEAD", "Merge the changes in without committing so they can be squashed" ],
[ "grunt test", "Run tests to make sure they still pass" ],
{ "prompt": "Describe this change in one line", "id": "line" },
[ "grunt chg-add:'{{line}} ([view](https\\://github.com/videojs/video.js/pull/{{prNum}}))'", "Add a line to the changelog" ],
[ "git add CHANGELOG.md", "Add the changlelog change to be committed" ],
[ "git commit -a --author='{{prCommits.[0].commit.author.name}} <{{prCommits.[0].commit.author.email}}>' -m '{{line}}. closes #{{prNum}}'", "Commit the changes" ],
{ "confirm": "Does everything look ok?" },
[ "git checkout {{pr.base.ref}}", "Check out the base branch" ],
[ "git merge {{pr.user.login}}-{{pr.head.ref}}", "Merge the changes" ],
[ "git push origin {{pr.base.ref}}", "Push the changes to your remote copy of the project" ],
[ "git push upstream {{pr.base.ref}}", "Push the changes to the main project" ],
[ "git branch -D {{pr.user.login}}-{{pr.head.ref}}", "Delete the local branch used for merging" ]
]
}
}