@dmlap add a contribflow configuration. closes #276
Showing
2 changed files
with
351 additions
and
0 deletions
... | @@ -3,6 +3,7 @@ CHANGELOG | ... | @@ -3,6 +3,7 @@ CHANGELOG |
3 | 3 | ||
4 | ## HEAD (Unreleased) | 4 | ## HEAD (Unreleased) |
5 | * @dmlap use contribflow to manage contributions ([view](https://github.com/videojs/videojs-contrib-hls/pull/275)) | 5 | * @dmlap use contribflow to manage contributions ([view](https://github.com/videojs/videojs-contrib-hls/pull/275)) |
6 | * @dmlap add a contribflow configuration ([view](https://github.com/videojs/videojs-contrib-hls/pull/276)) | ||
6 | 7 | ||
7 | -------------------- | 8 | -------------------- |
8 | 9 | ... | ... |
contrib.json
0 → 100644
1 | { | ||
2 | "meta": { | ||
3 | "org": "videojs", | ||
4 | "name": "videojs-contrib-hls", | ||
5 | "requirements": [ | ||
6 | { | ||
7 | "name": "git", | ||
8 | "info": "http://git-scm.com" | ||
9 | }, | ||
10 | { | ||
11 | "name": "node.js", | ||
12 | "info": "http://nodejs.org" | ||
13 | } | ||
14 | ], | ||
15 | "urls": { | ||
16 | "repo_api": "https://api.github.com/repos/videojs/videojs-contrib-hls", | ||
17 | "repo_ui": "https://github.com/videojs/videojs-contrib-hls" | ||
18 | }, | ||
19 | "branches": { | ||
20 | "development": "master", | ||
21 | "release": "master" | ||
22 | } | ||
23 | }, | ||
24 | |||
25 | "install": { | ||
26 | "desc": "Fork, download, and setup the project", | ||
27 | "steps": [ | ||
28 | { "prompt": "confirm", "desc": "You will now be taken to Github where you will choose an account to fork the project under. Remember which account you choose." }, | ||
29 | { "exec": "open https://github.com/{{meta.org}}/{{meta.name}}/fork" }, | ||
30 | { "prompt": "text", "desc": "Which account did you choose? (no '@')", "id": "owner" }, | ||
31 | { "exec": "git clone https://github.com/{{ owner }}/{{ meta.name }}.git" }, | ||
32 | { "exec": "cd {{ meta.name }}", "desc": "Change to the project directory" }, | ||
33 | { "include": "setup" } | ||
34 | ] | ||
35 | }, | ||
36 | |||
37 | "setup": { | ||
38 | "desc": "Set up version control and install dependencies", | ||
39 | "steps": [ | ||
40 | [ "git fetch origin", "Get all git branches" ], | ||
41 | [ "git remote add upstream https://github.com/{{meta.org}}/{{meta.name}}.git", "Add the upstream project as a remote for pulling changes" ], | ||
42 | [ "git fetch upstream", "Get all upstream branches and changes" ], | ||
43 | { "include": "update all" } | ||
44 | ] | ||
45 | }, | ||
46 | |||
47 | "update": { | ||
48 | "all": { | ||
49 | "steps": [ | ||
50 | { "include": "update master" }, | ||
51 | [ "npm install", "Download dependencies"], | ||
52 | [ "grunt", "Build the library" ] | ||
53 | ] | ||
54 | }, | ||
55 | "master": { | ||
56 | "steps": [ | ||
57 | [ "git checkout master", "Switch to the development branch" ], | ||
58 | [ "git pull upstream master", "Get any changes to master in the main project" ], | ||
59 | [ "git push origin master", "Push any changes to your copy of the main project" ] | ||
60 | ] | ||
61 | } | ||
62 | }, | ||
63 | |||
64 | "test": "grunt test" , | ||
65 | "server": "grunt connect", | ||
66 | |||
67 | "feature": { | ||
68 | "desc": "Create a new feature or general enhancement", | ||
69 | "baseBranch": "master", | ||
70 | "start": { | ||
71 | "desc": "Start a new feature", | ||
72 | "steps": [ | ||
73 | { "include": "update {{meta.branches.development}}" }, | ||
74 | { "include": "branch start" } | ||
75 | ] | ||
76 | }, | ||
77 | "save": { | ||
78 | "desc": "Save changes to your feature", | ||
79 | "steps": [{ "include": "branch save" }] | ||
80 | }, | ||
81 | "submit": { | ||
82 | "desc": "Submit a pull request for a feature when it's finished", | ||
83 | "steps": [{ "include": "pull_request submit" }] | ||
84 | }, | ||
85 | "delete": { | ||
86 | "desc": "Delete the current feature branch", | ||
87 | "steps": [{ "include": "branch delete" }] | ||
88 | }, | ||
89 | "review": { | ||
90 | "desc": "Review a submitted feature", | ||
91 | "steps": [{ "include": "pull_request review" }] | ||
92 | }, | ||
93 | "modify": { | ||
94 | "desc": "Modify a submitted feature that you are reviewing", | ||
95 | "steps": [{ "include": "pull_request modify" }] | ||
96 | }, | ||
97 | "accept": { | ||
98 | "desc": "Merge a submitted feature", | ||
99 | "steps": [ | ||
100 | { "include": "update {{meta.branches.development}}" }, | ||
101 | { "include": "pull_request accept" } | ||
102 | ] | ||
103 | } | ||
104 | }, | ||
105 | |||
106 | "patch": { | ||
107 | "desc": "Create an urgent fix for the latest stable version", | ||
108 | "baseBranch": "master", | ||
109 | "start": { | ||
110 | "desc": "Start a new patch", | ||
111 | "finished": "Make your changes and then run `contrib patch submit`", | ||
112 | "steps": [ | ||
113 | { "include": "update {{meta.branches.release}}" }, | ||
114 | { "include": "branch start" } | ||
115 | ] | ||
116 | }, | ||
117 | "save": { | ||
118 | "desc": "Save changes to your feature", | ||
119 | "steps": [{ "include": "branch save" }] | ||
120 | }, | ||
121 | "submit": { | ||
122 | "desc": "Submit a pull request for a patch when it's finished", | ||
123 | "steps": [{ "include": "pull_request submit" }] | ||
124 | }, | ||
125 | "delete": { | ||
126 | "desc": "Delete the current patch branch", | ||
127 | "steps": [{ "include": "branch delete" }] | ||
128 | }, | ||
129 | "review": { | ||
130 | "desc": "Review a submitted patch", | ||
131 | "steps": [{ "include": "pull_request review" }] | ||
132 | }, | ||
133 | "modify": { | ||
134 | "desc": "Modify a submitted patch that you are reviewing", | ||
135 | "steps": [{ "include": "pull_request modify" }] | ||
136 | }, | ||
137 | "accept": { | ||
138 | "desc": "Merge a submitted patch", | ||
139 | "steps": [ | ||
140 | { "include": "update {{meta.branches.release}}" }, | ||
141 | { "include": "pull_request accept" } | ||
142 | ] | ||
143 | } | ||
144 | }, | ||
145 | |||
146 | "report": { | ||
147 | "desc": "Submit a bug report", | ||
148 | "steps": [ | ||
149 | { "prompt": "text", "desc": "Create a title that is descriptive of the problem", "id": "title" }, | ||
150 | { "prompt": "text", "desc": "What did you do? (steps to reproduce)", "id": "reproduce" }, | ||
151 | { "prompt": "text", "desc": "What did you expect to happen?", "id": "expected" }, | ||
152 | { "prompt": "text", "desc": "What actually happened?", "id": "actual" }, | ||
153 | { "prompt": "text", "desc": "What version of video.js are you using?", "id": "version" }, | ||
154 | { "prompt": "text", "desc": "Are you using any other video.js plugins?", "id": "plugins" }, | ||
155 | { "prompt": "text", "desc": "What browsers/platforms did you experience this in (e.g. Win 7, IE10; Android 4, Chrome;)?", "id": "browsers" }, | ||
156 | { "prompt": "text", "desc": "Is there a URL to a live example, or a jsbin (e.g. http://jsbin.com/axedog/9999/edit)?", "id": "example" }, | ||
157 | { "prompt": "text", "desc": "Are there any other details you'd like to provide?", "id": "details" }, | ||
158 | { "open": "{{meta.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}}" } | ||
159 | ], | ||
160 | "finished": "Thanks for submitting a bug report! One of our contributors will address it as soon as possible." | ||
161 | }, | ||
162 | |||
163 | "request": { | ||
164 | "desc": "Submit a feature/enhancement request", | ||
165 | "steps": [ | ||
166 | { "prompt": "text", "desc": "Create a title that is descriptive of the enhancement", "id": "title" }, | ||
167 | { "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" }, | ||
168 | { "prompt": "text", "desc": "Is there any existing documentation or related specifications?", "id": "docs" }, | ||
169 | { "prompt": "text", "desc": "Are there any existing examples?", "id": "examples" }, | ||
170 | { "prompt": "confirm", "desc": "You will be redirected to Github where you can submit this issue, OK?" }, | ||
171 | { "open": "{{meta.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 }}" } | ||
172 | ], | ||
173 | "finished": "Thanks for submitting a feature request! One of our contributors will address it as soon as possible." | ||
174 | }, | ||
175 | |||
176 | "release": { | ||
177 | "desc": "Create and publish releases", | ||
178 | |||
179 | "patch": { | ||
180 | "release_type": "patch", | ||
181 | "steps": [{ "include": "release run" }] | ||
182 | }, | ||
183 | "minor": { | ||
184 | "release_type": "minor", | ||
185 | "steps": [{ "include": "release run" }] | ||
186 | }, | ||
187 | "prerelease": { | ||
188 | "release_type": "prerelease", | ||
189 | "steps": [ | ||
190 | [ "git checkout master", "Checkout the development branch" ], | ||
191 | [ "git pull upstream master", "Update the development branch" ], | ||
192 | { "include": "branch check" }, | ||
193 | [ "git checkout -b temp-release-branch master","Create a temporary branch for the dist" ], | ||
194 | [ "grunt version:{{release_type}}", "Bump package versions" ], | ||
195 | [ "./build/bin/version", "Return the current VJS Version from the package.json file", "version" ], | ||
196 | [ "git commit -am 'v{{version}}'", "Add and commit the package changes" ], | ||
197 | [ "git checkout master", "Checkout the developmet branch" ], | ||
198 | [ "git merge temp-release-branch", "Merge package changes into the dev brach" ], | ||
199 | [ "git push upstream master", "Push the dev branch changes to the repo" ], | ||
200 | [ "git checkout temp-release-branch", "Checkout the temp branch again" ], | ||
201 | [ "grunt dist", "Build the dist" ], | ||
202 | [ "git add dist --force", "Add the (otherwise ignored) release files" ], | ||
203 | [ "git commit -m 'v{{version}} dist'", "Commit the dist changes" ], | ||
204 | [ "git tag -a v{{version}} -m 'v{{version}}'", "Tag the release" ], | ||
205 | [ "git push upstream --tags", "Push the new tag to the repo" ], | ||
206 | [ "npm publish --tag next", "Publish to npm as 'next'" ], | ||
207 | [ "git checkout master", "Checkout the developmet branch" ], | ||
208 | [ "git branch -D temp-release-branch", "Delete the temp release branch" ] | ||
209 | ] | ||
210 | }, | ||
211 | "run": { | ||
212 | "steps": [ | ||
213 | { "include": "branch check" }, | ||
214 | [ "git checkout master", "Checkout the release branch" ], | ||
215 | [ "git pull upstream master", "Update the release branch" ], | ||
216 | [ "npm install", "Ensure dependency updates have been installed" ], | ||
217 | [ "grunt test", "Run tests" ], | ||
218 | [ "grunt version:{{ release_type }}", "Bump package versions" ], | ||
219 | [ "./build/bin/version", "Return the current VJS Version from the package.json file", "version" ], | ||
220 | [ "grunt chg-release:{{ version }}", "Update the changelog with the new release" ], | ||
221 | [ "grunt clean:dist", "Clean out the dist folder before the build" ], | ||
222 | [ "grunt", "Build the release" ], | ||
223 | [ "grunt vjsdocs", "Rebuild the docs" ], | ||
224 | [ "grunt cdn-links", "Update the cdn urls in the docs" ], | ||
225 | [ "git commit -am 'Release v{{ version }}'", "Commit the unstaged changes (package.json, changelog, etc)" ], | ||
226 | [ "git tag -a v{{version}} -m 'v{{version}}'", "Tag the current version" ], | ||
227 | [ "git push upstream master", "Push changes to the remote" ], | ||
228 | [ "git push upstream --tags", "Push tags to the remote" ], | ||
229 | [ "npm publish", "Publish to npm" ], | ||
230 | [ "grunt github-release", "Create a new release on Github" ] | ||
231 | ] | ||
232 | } | ||
233 | }, | ||
234 | |||
235 | "branch": { | ||
236 | "private": true, | ||
237 | |||
238 | "start": { | ||
239 | "steps": [ | ||
240 | { "prompt": "text", "id": "name", "desc": "Name the branch" }, | ||
241 | { "exec": "git checkout -b {{name}} {{baseBranch}}", "desc": "Create the branch" }, | ||
242 | { "exec": "git push -u origin {{name}}", "desc": "Push the branch to your remote copy of the project" } | ||
243 | ] | ||
244 | }, | ||
245 | "save": { | ||
246 | "desc": "Commit and push changes made to files in the project", | ||
247 | "steps": [ | ||
248 | { "include": "branch confirm" }, | ||
249 | { "prompt": "text", "id": "message", "desc": "Briefly describe the changes made" }, | ||
250 | { "exec": "git add .", "desc": "Add the changes" }, | ||
251 | { "exec": "git commit -m '{{message}}'", "desc": "Commit the changes" }, | ||
252 | { "exec": "git push origin {{branch_name}}", "desc": "Push the changes to your remote copy of the project" } | ||
253 | ] | ||
254 | }, | ||
255 | "check": { | ||
256 | "private": true, | ||
257 | "desc": "Check for unsaved changes", | ||
258 | "steps": [ | ||
259 | { "exec": "git diff --exit-code", "desc": "Ensure there's no unadded changes", "fail": "Make sure all changes have been saved (added and committed) or stashed" }, | ||
260 | { "exec": "git diff --cached --exit-code", "desc": "Ensure there's no uncommitted changes", "fail": "Make sure all changes have been saved (added and committed) or stashed" } | ||
261 | ] | ||
262 | }, | ||
263 | "name": { | ||
264 | "private": true, | ||
265 | "steps": [ | ||
266 | { "exec": "git rev-parse --abbrev-ref HEAD", "desc": "Get the current branch", "id": "branch_name" } | ||
267 | ] | ||
268 | }, | ||
269 | "confirm": { | ||
270 | "private": true, | ||
271 | "steps": [ | ||
272 | { "include": "branch name" }, | ||
273 | { "prompt": "confirm", "desc": "Are you sure *{{branch_name}}* is the correct branch?" } | ||
274 | ] | ||
275 | }, | ||
276 | "delete": { | ||
277 | "desc": "Delete the current branch", | ||
278 | "steps": [ | ||
279 | { "include": "branch confirm" }, | ||
280 | { "exec": "git checkout master", "desc": "Exit the branch being deleted" }, | ||
281 | { "exec": "git branch -D {{branch_name}}", "desc": "Delete the local copy of the branch" }, | ||
282 | { "exec": "git push origin :{{branch_name}}", "desc": "Delete the remote copy of the branch" } | ||
283 | ] | ||
284 | } | ||
285 | }, | ||
286 | |||
287 | "pull_request": { | ||
288 | "private": true, | ||
289 | "desc": "Pull request related commands", | ||
290 | |||
291 | "prepare": { | ||
292 | "private": true, | ||
293 | "steps": [ | ||
294 | { "include": "branch check" }, | ||
295 | { "include": "branch confirm" }, | ||
296 | { "include": "test" }, | ||
297 | { "prompt": "text", "desc": "Which github user or org are you submitting from?", "id": "user" } | ||
298 | ] | ||
299 | }, | ||
300 | "submit": { | ||
301 | "desc": "Submit a pull request for when the change is finished", | ||
302 | "steps": [ | ||
303 | { "include": "pull_request prepare" }, | ||
304 | { "open": "{{meta.urls.repo_ui}}/compare/videojs:{{baseBranch}}...{{user}}:{{branch_name}}", "desc": "Open the github pull request page" } | ||
305 | ] | ||
306 | }, | ||
307 | "review": { | ||
308 | "steps": [ | ||
309 | { "prompt": "text", "desc": "What is the the pull request number?", "id": "prNum" }, | ||
310 | { "get": "{{meta.urls.repo_api}}/pulls/{{prNum}}", "desc": "Get the PR information", "id": "pr" }, | ||
311 | [ "git fetch {{pr.head.repo.ssh_url}} {{pr.head.ref}}", "Get the pull request changes but don't merge them" ], | ||
312 | [ "git merge-base master FETCH_HEAD", "Get the common ancestor commit", "base" ], | ||
313 | [ "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" ], | ||
314 | [ "git merge FETCH_HEAD", "Merge in the pull request changes" ], | ||
315 | [ "grunt test", "Build and run tests" ] | ||
316 | ] | ||
317 | }, | ||
318 | "modify": { | ||
319 | "desc": "Submit a modification to a pull request that you are currently reviewing", | ||
320 | "steps": [ | ||
321 | { "include": "pull_request prepare" }, | ||
322 | { "prompt": "text", "desc": "What is the the pull request number?", "id": "prNum" }, | ||
323 | { "get": "{{meta.urls.repo_api}}/pulls/{{prNum}}", "desc": "Get the PR information", "id": "pr" }, | ||
324 | { "exec": "git push -u origin {{branch_name}}", "desc": "Push the changes to the remote repo" }, | ||
325 | { "open": "https://github.com/{{user}}/{{meta.name}}/compare/{{pr.head.label}}...{{user}}:{{branch_name}}", "desc": "Open the github pull request page" } | ||
326 | ] | ||
327 | }, | ||
328 | "accept": { | ||
329 | "steps": [ | ||
330 | { "prompt": "text", "id": "prNum", "desc": "What is the the pull request number?" }, | ||
331 | { "get": "{{meta.urls.repo_api}}/pulls/{{prNum}}", "desc": "Get the PR information", "id": "pr" }, | ||
332 | { "get": "{{meta.urls.repo_api}}/pulls/{{prNum}}/commits", "desc": "Get the PR commits to access author info", "id": "prCommits" }, | ||
333 | [ "git checkout -b {{pr.user.login}}-{{pr.head.ref}} {{pr.base.ref}}", "Create a new branch for merging the changes" ], | ||
334 | [ "git fetch {{pr.head.repo.ssh_url}} {{pr.head.ref}}", "Fetch the changes" ], | ||
335 | [ "git merge --no-commit --squash FETCH_HEAD", "Merge the changes in without committing so they can be squashed" ], | ||
336 | [ "grunt test", "Run tests to make sure they still pass" ], | ||
337 | { "prompt": "text", "id": "line", "desc": "Describe this change in one line" }, | ||
338 | [ "grunt chg-add:'{{line}} ([view](https\\://github.com/{{meta.org}}/{{meta.name}}/pull/{{prNum}}))'", "Add a line to the changelog" ], | ||
339 | [ "git add CHANGELOG.md", "Add the changlelog change to be committed" ], | ||
340 | [ "git commit -a --author='{{prCommits.[0].commit.author.name}} <{{prCommits.[0].commit.author.email}}>' -m '{{line}}. closes #{{prNum}}'", "Commit the changes" ], | ||
341 | { "prompt": "confirm", "desc": "Does everything look ok?" }, | ||
342 | [ "git checkout {{pr.base.ref}}", "Check out the base branch" ], | ||
343 | [ "git merge {{pr.user.login}}-{{pr.head.ref}}", "Merge the changes" ], | ||
344 | [ "git push origin {{pr.base.ref}}", "Push the changes to your remote copy of the project" ], | ||
345 | [ "git push upstream {{pr.base.ref}}", "Push the changes to the main project" ], | ||
346 | [ "git branch -D {{pr.user.login}}-{{pr.head.ref}}", "Delete the local branch used for merging" ] | ||
347 | ] | ||
348 | } | ||
349 | } | ||
350 | } |
-
Please register or sign in to post a comment