git_reflow 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +348 -348
- data/Gemfile.lock +13 -15
- data/LICENSE +20 -20
- data/README.rdoc +461 -461
- data/Rakefile +8 -8
- data/bin/console +7 -7
- data/bin/setup +6 -6
- data/circle.yml +5 -5
- data/exe/git-reflow +36 -36
- data/git_reflow.gemspec +1 -1
- data/lib/git_reflow/commands/deliver.rb +10 -10
- data/lib/git_reflow/commands/refresh.rb +20 -20
- data/lib/git_reflow/commands/review.rb +13 -13
- data/lib/git_reflow/commands/setup.rb +11 -11
- data/lib/git_reflow/commands/stage.rb +9 -9
- data/lib/git_reflow/commands/start.rb +22 -22
- data/lib/git_reflow/commands/status.rb +7 -7
- data/lib/git_reflow/config.rb +9 -9
- data/lib/git_reflow/git_server/base.rb +68 -68
- data/lib/git_reflow/git_server/bit_bucket/pull_request.rb +84 -84
- data/lib/git_reflow/git_server/bit_bucket.rb +101 -101
- data/lib/git_reflow/git_server/git_hub/pull_request.rb +4 -1
- data/lib/git_reflow/git_server/pull_request.rb +11 -2
- data/lib/git_reflow/git_server.rb +63 -63
- data/lib/git_reflow/logger.rb +49 -0
- data/lib/git_reflow/merge_error.rb +9 -9
- data/lib/git_reflow/os_detector.rb +23 -23
- data/lib/git_reflow/rspec/command_line_helpers.rb +12 -8
- data/lib/git_reflow/rspec/stub_helpers.rb +13 -13
- data/lib/git_reflow/rspec.rb +2 -2
- data/lib/git_reflow/sandbox.rb +11 -6
- data/lib/git_reflow/version.rb +1 -1
- data/lib/git_reflow/workflow.rb +59 -59
- data/lib/git_reflow/workflows/core.rb +238 -238
- data/lib/git_reflow/workflows/flat_merge.rb +10 -10
- data/lib/git_reflow.rb +11 -0
- data/spec/fixtures/awesome_workflow.rb +7 -0
- data/spec/fixtures/git/git_config +7 -0
- data/spec/fixtures/issues/comment.json.erb +27 -0
- data/spec/fixtures/issues/comments.json +29 -0
- data/spec/fixtures/issues/comments.json.erb +15 -0
- data/spec/fixtures/pull_requests/comment.json.erb +45 -0
- data/spec/fixtures/pull_requests/comments.json +47 -0
- data/spec/fixtures/pull_requests/comments.json.erb +15 -0
- data/spec/fixtures/pull_requests/commits.json +29 -0
- data/spec/fixtures/pull_requests/external_pull_request.json +145 -0
- data/spec/fixtures/pull_requests/pull_request.json +142 -0
- data/spec/fixtures/pull_requests/pull_request.json.erb +142 -0
- data/spec/fixtures/pull_requests/pull_request_exists_error.json +32 -0
- data/spec/fixtures/pull_requests/pull_requests.json +136 -0
- data/spec/fixtures/repositories/commit.json +53 -0
- data/spec/fixtures/repositories/commit.json.erb +53 -0
- data/spec/fixtures/repositories/commits.json.erb +13 -0
- data/spec/fixtures/repositories/statuses.json +31 -0
- data/spec/fixtures/workflow_with_super.rb +8 -0
- data/spec/lib/git_reflow/config_spec.rb +74 -0
- data/spec/lib/git_reflow/git_helpers_spec.rb +182 -0
- data/spec/lib/git_reflow/git_server/bit_bucket_spec.rb +81 -0
- data/spec/lib/git_reflow/git_server/git_hub/pull_request_spec.rb +587 -0
- data/spec/lib/git_reflow/git_server/git_hub_spec.rb +221 -0
- data/spec/lib/git_reflow/git_server/pull_request_spec.rb +524 -0
- data/spec/lib/git_reflow/git_server_spec.rb +101 -0
- data/spec/lib/git_reflow/logger_spec.rb +18 -0
- data/spec/lib/git_reflow/sandbox_spec.rb +15 -0
- data/spec/lib/git_reflow/workflow_spec.rb +59 -0
- data/spec/lib/git_reflow/workflows/core_spec.rb +665 -0
- data/spec/lib/git_reflow/workflows/flat_merge_spec.rb +59 -0
- data/spec/lib/git_reflow_spec.rb +75 -0
- data/spec/spec_helper.rb +38 -0
- data/spec/support/fake_github.rb +128 -0
- data/spec/support/fixtures.rb +54 -0
- data/spec/support/github_helpers.rb +109 -0
- data/spec/support/mock_pull_request.rb +17 -0
- data/spec/support/web_mocks.rb +39 -0
- metadata +83 -6
@@ -0,0 +1,45 @@
|
|
1
|
+
{
|
2
|
+
"url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/comments/<%= id || 1 %>",
|
3
|
+
"id": <%= id || 1 %>,
|
4
|
+
"diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
|
5
|
+
"path": "file1.txt",
|
6
|
+
"position": 1,
|
7
|
+
"original_position": 4,
|
8
|
+
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
|
9
|
+
"original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
|
10
|
+
"user": {
|
11
|
+
"login": "<%= author %>",
|
12
|
+
"id": 1,
|
13
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
14
|
+
"gravatar_id": "somehexcode",
|
15
|
+
"url": "https://api.github.com/users/<%= author %>",
|
16
|
+
"html_url": "https://github.com/<%= author %>",
|
17
|
+
"followers_url": "https://api.github.com/users/<%= author %>/followers",
|
18
|
+
"following_url": "https://api.github.com/users/<%= author %>/following{/other_user}",
|
19
|
+
"gists_url": "https://api.github.com/users/<%= author %>/gists{/gist_id}",
|
20
|
+
"starred_url": "https://api.github.com/users/<%= author %>/starred{/owner}{/repo}",
|
21
|
+
"subscriptions_url": "https://api.github.com/users/<%= author %>/subscriptions",
|
22
|
+
"organizations_url": "https://api.github.com/users/<%= author %>/orgs",
|
23
|
+
"repos_url": "https://api.github.com/users/<%= author %>/repos",
|
24
|
+
"events_url": "https://api.github.com/users/<%= author %>/events{/privacy}",
|
25
|
+
"received_events_url": "https://api.github.com/users/<%= author %>/received_events",
|
26
|
+
"type": "User",
|
27
|
+
"site_admin": false
|
28
|
+
},
|
29
|
+
"body": "<%= body || "Great stuff" %>",
|
30
|
+
"created_at": "<%= created_at || "2011-04-14T16:00:49Z" %>",
|
31
|
+
"updated_at": "<%= updated_at || created_at || "2011-04-14T16:00:49Z" %>",
|
32
|
+
"html_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pull/<%= pull_request_number %>#discussion-diff-<%= id || 1 %>",
|
33
|
+
"pull_request_url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/<%= pull_request_number %>",
|
34
|
+
"_links": {
|
35
|
+
"self": {
|
36
|
+
"href": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/comments/<%= pull_request_number %>"
|
37
|
+
},
|
38
|
+
"html": {
|
39
|
+
"href": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pull/<%= pull_request_number %>#discussion-diff-<%= id || 1 %>"
|
40
|
+
},
|
41
|
+
"pull_request": {
|
42
|
+
"href": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/<%= pull_request_number %>"
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"url": "https://api.github.com/repos/reenhanced/repo/pulls/comments/1",
|
4
|
+
"id": 1,
|
5
|
+
"diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
|
6
|
+
"path": "file1.txt",
|
7
|
+
"position": 1,
|
8
|
+
"original_position": 4,
|
9
|
+
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
|
10
|
+
"original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
|
11
|
+
"user": {
|
12
|
+
"login": "reenhanced",
|
13
|
+
"id": 1,
|
14
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
15
|
+
"gravatar_id": "somehexcode",
|
16
|
+
"url": "https://api.github.com/users/reenhanced",
|
17
|
+
"html_url": "https://github.com/reenhanced",
|
18
|
+
"followers_url": "https://api.github.com/users/reenhanced/followers",
|
19
|
+
"following_url": "https://api.github.com/users/reenhanced/following{/other_user}",
|
20
|
+
"gists_url": "https://api.github.com/users/reenhanced/gists{/gist_id}",
|
21
|
+
"starred_url": "https://api.github.com/users/reenhanced/starred{/owner}{/repo}",
|
22
|
+
"subscriptions_url": "https://api.github.com/users/reenhanced/subscriptions",
|
23
|
+
"organizations_url": "https://api.github.com/users/reenhanced/orgs",
|
24
|
+
"repos_url": "https://api.github.com/users/reenhanced/repos",
|
25
|
+
"events_url": "https://api.github.com/users/reenhanced/events{/privacy}",
|
26
|
+
"received_events_url": "https://api.github.com/users/reenhanced/received_events",
|
27
|
+
"type": "User",
|
28
|
+
"site_admin": false
|
29
|
+
},
|
30
|
+
"body": "Great stuff",
|
31
|
+
"created_at": "2011-04-14T16:00:49Z",
|
32
|
+
"updated_at": "2011-04-14T16:00:49Z",
|
33
|
+
"html_url": "https://github.com/reenhanced/repo/pull/1#discussion-diff-1",
|
34
|
+
"pull_request_url": "https://api.github.com/repos/reenhanced/repo/pulls/1",
|
35
|
+
"_links": {
|
36
|
+
"self": {
|
37
|
+
"href": "https://api.github.com/repos/reenhanced/repo/pulls/comments/1"
|
38
|
+
},
|
39
|
+
"html": {
|
40
|
+
"href": "https://github.com/reenhanced/repo/pull/1#discussion-diff-1"
|
41
|
+
},
|
42
|
+
"pull_request": {
|
43
|
+
"href": "https://api.github.com/repos/reenhanced/repo/pulls/1"
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
]
|
@@ -0,0 +1,15 @@
|
|
1
|
+
[
|
2
|
+
<% comments_json = [] %>
|
3
|
+
<% comments.each_with_index do |comment, index| %>
|
4
|
+
<% comments_json << Fixture.new('pull_requests/comment.json.erb',
|
5
|
+
id: index,
|
6
|
+
author: comment[:author],
|
7
|
+
pull_request_number: pull_request_number,
|
8
|
+
repo_owner: repo_owner,
|
9
|
+
repo_name: repo_name,
|
10
|
+
body: comment[:body] || 'Hammer time',
|
11
|
+
created_at: comment[:created_at] || Chronic.parse('October 21, 2015 07:28:00')
|
12
|
+
).to_s %>
|
13
|
+
<% end %>
|
14
|
+
<%= comments_json.join(", ") %>
|
15
|
+
]
|
@@ -0,0 +1,29 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"commit": {
|
4
|
+
"sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
|
5
|
+
"url": "https://api.github.com/repos/reenhanced/repo/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
|
6
|
+
"author": {
|
7
|
+
"date": "2010-04-10T14:10:01-07:00",
|
8
|
+
"name": "Draco Powers",
|
9
|
+
"email": "draco@reenhanced.com"
|
10
|
+
},
|
11
|
+
"committer": {
|
12
|
+
"date": "2010-04-10T14:10:01-07:00",
|
13
|
+
"name": "Draco Powers",
|
14
|
+
"email": "draco@reenhanced.com"
|
15
|
+
},
|
16
|
+
"message": "added readme, because im a good github citizen\n",
|
17
|
+
"tree": {
|
18
|
+
"url": "https://api.github.com/repos/reenhanced/repo/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
|
19
|
+
"sha": "691272480426f78a0138979dd3ce63b77f706feb"
|
20
|
+
},
|
21
|
+
"parents": [
|
22
|
+
{
|
23
|
+
"url": "https://api.github.com/repos/reenhanced/repo/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
|
24
|
+
"sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5"
|
25
|
+
}
|
26
|
+
]
|
27
|
+
}
|
28
|
+
}
|
29
|
+
]
|
@@ -0,0 +1,145 @@
|
|
1
|
+
{
|
2
|
+
"url": "https://api.github.com/reenhanced/repo/pulls/2",
|
3
|
+
"html_url": "https://github.com/reenhanced/repo/pulls/2",
|
4
|
+
"diff_url": "https://github.com/reenhanced/repo/pulls/2.diff",
|
5
|
+
"patch_url": "https://github.com/reenhanced/repo/pulls/2.patch",
|
6
|
+
"issue_url": "https://github.com/reenhanced/repo/issue/2",
|
7
|
+
"number": 2,
|
8
|
+
"state": "open",
|
9
|
+
"title": "new-external-feature",
|
10
|
+
"body": "Please pull these awesome changes",
|
11
|
+
"created_at": "2011-01-26T19:01:12Z",
|
12
|
+
"updated_at": "2011-01-26T19:01:12Z",
|
13
|
+
"closed_at": "2011-01-26T19:01:12Z",
|
14
|
+
"merged_at": "2011-01-26T19:01:12Z",
|
15
|
+
"_links": {
|
16
|
+
"self": {
|
17
|
+
"href": "https://api.github.com/reenhanced/repo/pulls/2"
|
18
|
+
},
|
19
|
+
"html": {
|
20
|
+
"href": "https://github.com/reenhanced/repo/pull/2"
|
21
|
+
},
|
22
|
+
"comments": {
|
23
|
+
"href": "https://api.github.com/reenhanced/repo/issues/2/comments"
|
24
|
+
},
|
25
|
+
"review_comments": {
|
26
|
+
"href": "https://api.github.com/reenhanced/repo/pulls/2/comments"
|
27
|
+
}
|
28
|
+
},
|
29
|
+
"merged": false,
|
30
|
+
"mergeable": true,
|
31
|
+
"merged_by": {
|
32
|
+
"login": "reenhanced",
|
33
|
+
"id": 1,
|
34
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
35
|
+
"gravatar_id": "somehexcode",
|
36
|
+
"url": "https://api.github.com/users/reenhanced"
|
37
|
+
},
|
38
|
+
"comments": 10,
|
39
|
+
"commits": 3,
|
40
|
+
"additions": 100,
|
41
|
+
"deletions": 3,
|
42
|
+
"changed_files": 5,
|
43
|
+
"user": {
|
44
|
+
"login": "reenhanced",
|
45
|
+
"id": 1,
|
46
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
47
|
+
"gravatar_id": "",
|
48
|
+
"url": "https://api.github.com/users/reenhanced",
|
49
|
+
"html_url": "https://github.com/reenhanced",
|
50
|
+
"followers_url": "https://api.github.com/users/reenhanced/followers",
|
51
|
+
"following_url":
|
52
|
+
"https://api.github.com/users/reenhanced/following{/other_user}",
|
53
|
+
"gists_url": "https://api.github.com/users/reenhanced/gists{/gist_id}",
|
54
|
+
"starred_url":
|
55
|
+
"https://api.github.com/users/reenhanced/starred{/owner}{/repo}",
|
56
|
+
"subscriptions_url": "https://api.github.com/users/reenhanced/subscriptions",
|
57
|
+
"organizations_url": "https://api.github.com/users/reenhanced/orgs",
|
58
|
+
"repos_url": "https://api.github.com/users/reenhanced/repos",
|
59
|
+
"events_url": "https://api.github.com/users/reenhanced/events{/privacy}",
|
60
|
+
"received_events_url":
|
61
|
+
"https://api.github.com/users/reenhanced/received_events",
|
62
|
+
"type": "User",
|
63
|
+
"site_admin": false
|
64
|
+
},
|
65
|
+
"head": {
|
66
|
+
"label": "new-external-feature",
|
67
|
+
"ref": "new-external-feature",
|
68
|
+
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
|
69
|
+
"user": {
|
70
|
+
"login": "octocat",
|
71
|
+
"id": 1,
|
72
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
73
|
+
"gravatar_id": "somehexcode",
|
74
|
+
"url": "https://api.github.com/users/octocat"
|
75
|
+
},
|
76
|
+
"repo": {
|
77
|
+
"url": "https://api.github.com/repos/octocat/repo",
|
78
|
+
"html_url": "https://github.com/octocat/repo",
|
79
|
+
"clone_url": "https://github.com/octocat/repo.git",
|
80
|
+
"git_url": "git://github.com/octocat/repo.git",
|
81
|
+
"ssh_url": "git@github.com:octocat/repo.git",
|
82
|
+
"svn_url": "https://svn.github.com/octocat/repo",
|
83
|
+
"owner": {
|
84
|
+
"login": "octocat",
|
85
|
+
"id": 1,
|
86
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
87
|
+
"gravatar_id": "somehexcode",
|
88
|
+
"url": "https://api.github.com/users/octocat"
|
89
|
+
},
|
90
|
+
"name": "repo",
|
91
|
+
"description": "This your first repo!",
|
92
|
+
"homepage": "https://github.com",
|
93
|
+
"language": null,
|
94
|
+
"private": false,
|
95
|
+
"fork": false,
|
96
|
+
"forks": 9,
|
97
|
+
"watchers": 80,
|
98
|
+
"size": 108,
|
99
|
+
"master_branch": "master",
|
100
|
+
"open_issues": 0,
|
101
|
+
"pushed_at": "2011-01-26T19:06:43Z",
|
102
|
+
"created_at": "2011-01-26T19:01:12Z"
|
103
|
+
}
|
104
|
+
},
|
105
|
+
"base": {
|
106
|
+
"label": "reenhanced:master",
|
107
|
+
"ref": "master",
|
108
|
+
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
|
109
|
+
"user": {
|
110
|
+
"login": "reenhanced",
|
111
|
+
"id": 1,
|
112
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
113
|
+
"gravatar_id": "somehexcode",
|
114
|
+
"url": "https://api.github.com/users/reenhanced"
|
115
|
+
},
|
116
|
+
"repo": {
|
117
|
+
"url": "https://api.github.com/repos/reenhanced/repo",
|
118
|
+
"html_url": "https://github.com/reenhanced/repo",
|
119
|
+
"clone_url": "https://github.com/reenhanced/repo.git",
|
120
|
+
"git_url": "git://github.com/reenhanced/repo.git",
|
121
|
+
"ssh_url": "git@github.com:reenhanced/repo.git",
|
122
|
+
"svn_url": "https://svn.github.com/reenhanced/repo",
|
123
|
+
"owner": {
|
124
|
+
"login": "reenhanced",
|
125
|
+
"id": 1,
|
126
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
127
|
+
"gravatar_id": "somehexcode",
|
128
|
+
"url": "https://api.github.com/users/reenhanced"
|
129
|
+
},
|
130
|
+
"name": "repo",
|
131
|
+
"description": "This your first repo!",
|
132
|
+
"homepage": "https://github.com",
|
133
|
+
"language": null,
|
134
|
+
"private": false,
|
135
|
+
"fork": false,
|
136
|
+
"forks": 9,
|
137
|
+
"watchers": 80,
|
138
|
+
"size": 108,
|
139
|
+
"master_branch": "master",
|
140
|
+
"open_issues": 0,
|
141
|
+
"pushed_at": "2011-01-26T19:06:43Z",
|
142
|
+
"created_at": "2011-01-26T19:01:12Z"
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
@@ -0,0 +1,142 @@
|
|
1
|
+
{
|
2
|
+
"url": "https://api.github.com/reenhanced/repo/pulls/1",
|
3
|
+
"html_url": "https://github.com/reenhanced/repo/pulls/1",
|
4
|
+
"diff_url": "https://github.com/reenhanced/repo/pulls/1.diff",
|
5
|
+
"patch_url": "https://github.com/reenhanced/repo/pulls/1.patch",
|
6
|
+
"issue_url": "https://github.com/reenhanced/repo/issue/1",
|
7
|
+
"number": 1,
|
8
|
+
"state": "open",
|
9
|
+
"title": "new-feature",
|
10
|
+
"body": "Please pull these awesome changes",
|
11
|
+
"created_at": "2011-01-26T19:01:12Z",
|
12
|
+
"updated_at": "2011-01-26T19:01:12Z",
|
13
|
+
"closed_at": "2011-01-26T19:01:12Z",
|
14
|
+
"merged_at": "2011-01-26T19:01:12Z",
|
15
|
+
"_links": {
|
16
|
+
"self": {
|
17
|
+
"href": "https://api.github.com/reenhanced/repo/pulls/1"
|
18
|
+
},
|
19
|
+
"html": {
|
20
|
+
"href": "https://github.com/reenhanced/repo/pull/1"
|
21
|
+
},
|
22
|
+
"comments": {
|
23
|
+
"href": "https://api.github.com/reenhanced/repo/issues/1/comments"
|
24
|
+
},
|
25
|
+
"review_comments": {
|
26
|
+
"href": "https://api.github.com/reenhanced/repo/pulls/1/comments"
|
27
|
+
}
|
28
|
+
},
|
29
|
+
"user": {
|
30
|
+
"login": "reenhanced",
|
31
|
+
"id": 1,
|
32
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
33
|
+
"gravatar_id": "",
|
34
|
+
"url": "https://api.github.com/users/reenhanced",
|
35
|
+
"html_url": "https://github.com/reenhanced",
|
36
|
+
"followers_url": "https://api.github.com/users/reenhanced/followers",
|
37
|
+
"following_url": "https://api.github.com/users/reenhanced/following{/other_user}",
|
38
|
+
"gists_url": "https://api.github.com/users/reenhanced/gists{/gist_id}",
|
39
|
+
"starred_url": "https://api.github.com/users/reenhanced/starred{/owner}{/repo}",
|
40
|
+
"subscriptions_url": "https://api.github.com/users/reenhanced/subscriptions",
|
41
|
+
"organizations_url": "https://api.github.com/users/reenhanced/orgs",
|
42
|
+
"repos_url": "https://api.github.com/users/reenhanced/repos",
|
43
|
+
"events_url": "https://api.github.com/users/reenhanced/events{/privacy}",
|
44
|
+
"received_events_url": "https://api.github.com/users/reenhanced/received_events",
|
45
|
+
"type": "User",
|
46
|
+
"site_admin": false
|
47
|
+
},
|
48
|
+
"merged": false,
|
49
|
+
"mergeable": true,
|
50
|
+
"merged_by": {
|
51
|
+
"login": "reenhanced",
|
52
|
+
"id": 1,
|
53
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
54
|
+
"gravatar_id": "somehexcode",
|
55
|
+
"url": "https://api.github.com/users/reenhanced"
|
56
|
+
},
|
57
|
+
"comments": 10,
|
58
|
+
"commits": 3,
|
59
|
+
"additions": 100,
|
60
|
+
"deletions": 3,
|
61
|
+
"changed_files": 5,
|
62
|
+
"head": {
|
63
|
+
"label": "new-feature",
|
64
|
+
"ref": "new-feature",
|
65
|
+
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
|
66
|
+
"user": {
|
67
|
+
"login": "reenhanced",
|
68
|
+
"id": 1,
|
69
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
70
|
+
"gravatar_id": "somehexcode",
|
71
|
+
"url": "https://api.github.com/users/reenhanced"
|
72
|
+
},
|
73
|
+
"repo": {
|
74
|
+
"url": "https://api.github.com/repos/reenhanced/repo",
|
75
|
+
"html_url": "https://github.com/reenhanced/repo",
|
76
|
+
"clone_url": "https://github.com/reenhanced/repo.git",
|
77
|
+
"git_url": "git://github.com/reenhanced/repo.git",
|
78
|
+
"ssh_url": "git@github.com:reenhanced/repo.git",
|
79
|
+
"svn_url": "https://svn.github.com/reenhanced/repo",
|
80
|
+
"owner": {
|
81
|
+
"login": "reenhanced",
|
82
|
+
"id": 1,
|
83
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
84
|
+
"gravatar_id": "somehexcode",
|
85
|
+
"url": "https://api.github.com/users/reenhanced"
|
86
|
+
},
|
87
|
+
"name": "repo",
|
88
|
+
"description": "This your first repo!",
|
89
|
+
"homepage": "https://github.com",
|
90
|
+
"language": null,
|
91
|
+
"private": false,
|
92
|
+
"fork": false,
|
93
|
+
"forks": 9,
|
94
|
+
"watchers": 80,
|
95
|
+
"size": 108,
|
96
|
+
"master_branch": "master",
|
97
|
+
"open_issues": 0,
|
98
|
+
"pushed_at": "2011-01-26T19:06:43Z",
|
99
|
+
"created_at": "2011-01-26T19:01:12Z"
|
100
|
+
}
|
101
|
+
},
|
102
|
+
"base": {
|
103
|
+
"label": "master",
|
104
|
+
"ref": "master",
|
105
|
+
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
|
106
|
+
"user": {
|
107
|
+
"login": "reenhanced",
|
108
|
+
"id": 1,
|
109
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
110
|
+
"gravatar_id": "somehexcode",
|
111
|
+
"url": "https://api.github.com/users/reenhanced"
|
112
|
+
},
|
113
|
+
"repo": {
|
114
|
+
"url": "https://api.github.com/repos/reenhanced/repo",
|
115
|
+
"html_url": "https://github.com/reenhanced/repo",
|
116
|
+
"clone_url": "https://github.com/reenhanced/repo.git",
|
117
|
+
"git_url": "git://github.com/reenhanced/repo.git",
|
118
|
+
"ssh_url": "git@github.com:reenhanced/repo.git",
|
119
|
+
"svn_url": "https://svn.github.com/reenhanced/repo",
|
120
|
+
"owner": {
|
121
|
+
"login": "reenhanced",
|
122
|
+
"id": 1,
|
123
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
124
|
+
"gravatar_id": "somehexcode",
|
125
|
+
"url": "https://api.github.com/users/reenhanced"
|
126
|
+
},
|
127
|
+
"name": "repo",
|
128
|
+
"description": "This your first repo!",
|
129
|
+
"homepage": "https://github.com",
|
130
|
+
"language": null,
|
131
|
+
"private": false,
|
132
|
+
"fork": false,
|
133
|
+
"forks": 9,
|
134
|
+
"watchers": 80,
|
135
|
+
"size": 108,
|
136
|
+
"master_branch": "master",
|
137
|
+
"open_issues": 0,
|
138
|
+
"pushed_at": "2011-01-26T19:06:43Z",
|
139
|
+
"created_at": "2011-01-26T19:01:12Z"
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
@@ -0,0 +1,142 @@
|
|
1
|
+
{
|
2
|
+
"url": "https://api.github.com/<%= repo_owner %>/<%= repo_name %>/pulls/<%= number %>",
|
3
|
+
"html_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pulls/<%= number %>",
|
4
|
+
"diff_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pulls/<%= number %>.diff",
|
5
|
+
"patch_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pulls/<%= number %>.patch",
|
6
|
+
"issue_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>/issue/<%= number %>",
|
7
|
+
"number": <%= number %>,
|
8
|
+
"state": "<%= state %>",
|
9
|
+
"title": "<%= title %>",
|
10
|
+
"body": "<%= body %>",
|
11
|
+
"created_at": "2011-01-26T19:01:12Z",
|
12
|
+
"updated_at": "2011-01-26T19:01:12Z",
|
13
|
+
"closed_at": "2011-01-26T19:01:12Z",
|
14
|
+
"merged_at": "2011-01-26T19:01:12Z",
|
15
|
+
"_links": {
|
16
|
+
"self": {
|
17
|
+
"href": "https://api.github.com/<%= repo_owner %>/<%= repo_name %>/pulls/<%= number %>"
|
18
|
+
},
|
19
|
+
"html": {
|
20
|
+
"href": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pull/<%= number %>"
|
21
|
+
},
|
22
|
+
"comments": {
|
23
|
+
"href": "https://api.github.com/<%= repo_owner %>/<%= repo_name %>/issues/<%= number %>/comments"
|
24
|
+
},
|
25
|
+
"review_comments": {
|
26
|
+
"href": "https://api.github.com/<%= repo_owner %>/<%= repo_name %>/pulls/<%= number %>/comments"
|
27
|
+
}
|
28
|
+
},
|
29
|
+
"merged": false,
|
30
|
+
"mergeable": true,
|
31
|
+
"merged_by": {
|
32
|
+
"login": "reenhanced",
|
33
|
+
"id": 1,
|
34
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
35
|
+
"gravatar_id": "somehexcode",
|
36
|
+
"url": "https://api.github.com/users/reenhanced"
|
37
|
+
},
|
38
|
+
"comments": 10,
|
39
|
+
"commits": 3,
|
40
|
+
"additions": 100,
|
41
|
+
"deletions": 3,
|
42
|
+
"changed_files": 5,
|
43
|
+
"user": {
|
44
|
+
"login": "<%= owner %>",
|
45
|
+
"id": 1,
|
46
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
47
|
+
"gravatar_id": "",
|
48
|
+
"url": "https://api.github.com/users/<%= owner %>",
|
49
|
+
"html_url": "https://github.com/<%= owner %>",
|
50
|
+
"followers_url": "https://api.github.com/users/<%= owner %>/followers",
|
51
|
+
"following_url": "https://api.github.com/users/<%= owner %>/following{/other_user}",
|
52
|
+
"gists_url": "https://api.github.com/users/<%= owner %>/gists{/gist_id}",
|
53
|
+
"starred_url": "https://api.github.com/users/<%= owner %>/starred{/owner}{/repo}",
|
54
|
+
"subscriptions_url": "https://api.github.com/users/<%= owner %>/subscriptions",
|
55
|
+
"organizations_url": "https://api.github.com/users/<%= owner %>/orgs",
|
56
|
+
"repos_url": "https://api.github.com/users/<%= owner %>/repos",
|
57
|
+
"events_url": "https://api.github.com/users/<%= owner %>/events{/privacy}",
|
58
|
+
"received_events_url": "https://api.github.com/users/<%= owner %>/received_events",
|
59
|
+
"type": "User",
|
60
|
+
"site_admin": false
|
61
|
+
},
|
62
|
+
"head": {
|
63
|
+
"label": "<%= feature_branch %>",
|
64
|
+
"ref": "<%= feature_branch %>",
|
65
|
+
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
|
66
|
+
"user": {
|
67
|
+
"login": "<%= owner %>",
|
68
|
+
"id": 1,
|
69
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
70
|
+
"gravatar_id": "somehexcode",
|
71
|
+
"url": "https://api.github.com/users/<%= owner %>"
|
72
|
+
},
|
73
|
+
"repo": {
|
74
|
+
"url": "https://api.github.com/repos/<%= feature_repo_owner %>/<%= repo_name %>",
|
75
|
+
"html_url": "https://github.com/<%= feature_repo_owner %>/<%= repo_name %>",
|
76
|
+
"clone_url": "https://github.com/<%= feature_repo_owner %>/<%= repo_name %>.git",
|
77
|
+
"git_url": "git://github.com/<%= feature_repo_owner %>/<%= repo_name %>.git",
|
78
|
+
"ssh_url": "git@github.com:<%= feature_repo_owner %>/<%= repo_name %>.git",
|
79
|
+
"svn_url": "https://svn.github.com/<%= feature_repo_owner %>/<%= repo_name %>",
|
80
|
+
"owner": {
|
81
|
+
"login": "<%= owner %>",
|
82
|
+
"id": 1,
|
83
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
84
|
+
"gravatar_id": "somehexcode",
|
85
|
+
"url": "https://api.github.com/users/<%= owner %>"
|
86
|
+
},
|
87
|
+
"name": "<%= repo_name %>",
|
88
|
+
"description": "This your first repo!",
|
89
|
+
"homepage": "https://github.com",
|
90
|
+
"language": null,
|
91
|
+
"private": false,
|
92
|
+
"fork": false,
|
93
|
+
"forks": 9,
|
94
|
+
"watchers": 80,
|
95
|
+
"size": 108,
|
96
|
+
"master_branch": "master",
|
97
|
+
"open_issues": 1,
|
98
|
+
"pushed_at": "2011-01-26T19:06:43Z",
|
99
|
+
"created_at": "2011-01-26T19:01:12Z"
|
100
|
+
}
|
101
|
+
},
|
102
|
+
"base": {
|
103
|
+
"label": "<%= base_branch %>",
|
104
|
+
"ref": "<%= base_branch %>",
|
105
|
+
"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
|
106
|
+
"user": {
|
107
|
+
"login": "reenhanced",
|
108
|
+
"id": 1,
|
109
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
110
|
+
"gravatar_id": "somehexcode",
|
111
|
+
"url": "https://api.github.com/users/reenhanced"
|
112
|
+
},
|
113
|
+
"repo": {
|
114
|
+
"url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>",
|
115
|
+
"html_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>",
|
116
|
+
"clone_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>.git",
|
117
|
+
"git_url": "git://github.com/<%= repo_owner %>/<%= repo_name %>.git",
|
118
|
+
"ssh_url": "git@github.com:<%= repo_owner %>/<%= repo_name %>.git",
|
119
|
+
"svn_url": "https://svn.github.com/<%= repo_owner %>/<%= repo_name %>",
|
120
|
+
"owner": {
|
121
|
+
"login": "reenhanced",
|
122
|
+
"id": 1,
|
123
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
124
|
+
"gravatar_id": "somehexcode",
|
125
|
+
"url": "https://api.github.com/users/reenhanced"
|
126
|
+
},
|
127
|
+
"name": "repo",
|
128
|
+
"description": "This your first repo!",
|
129
|
+
"homepage": "https://github.com",
|
130
|
+
"language": null,
|
131
|
+
"private": false,
|
132
|
+
"fork": false,
|
133
|
+
"forks": 9,
|
134
|
+
"watchers": 80,
|
135
|
+
"size": 108,
|
136
|
+
"master_branch": "master",
|
137
|
+
"open_issues": 1,
|
138
|
+
"pushed_at": "2011-01-26T19:06:43Z",
|
139
|
+
"created_at": "2011-01-26T19:01:12Z"
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
:method => :post,
|
3
|
+
:body => "{
|
4
|
+
\"errors\" : [{
|
5
|
+
\"code\" : \"custom\",
|
6
|
+
\"field\" : \"base\",
|
7
|
+
\"message\" : \"base A pull request already exists for reenhanced:banana.\",
|
8
|
+
\"resource\" : \"PullRequest\" }],
|
9
|
+
\"message\" : \"Validation Failed\"}",
|
10
|
+
:url => "https://api.github.com/repos/reenhanced/gitreflow/pulls?access_token=12345",
|
11
|
+
:request_headers => {
|
12
|
+
"Content-Type" => "application/json",
|
13
|
+
"Authorization" => "Token token=\"12345\""
|
14
|
+
},
|
15
|
+
:parallel_manager => nil,
|
16
|
+
:request => {:proxy => nil},
|
17
|
+
:ssl => {},
|
18
|
+
:status => 422,
|
19
|
+
:response_headers => {
|
20
|
+
"server" => "nginx/1.0.13",
|
21
|
+
"date" => "Fri, 27 Apr 2012 13:02:49 GMT",
|
22
|
+
"content-type" => "application/json; charset=utf-8",
|
23
|
+
"connection" => "close",
|
24
|
+
"status" => "422 Unprocessable Entity",
|
25
|
+
"x-ratelimit-limit" => "5000",
|
26
|
+
"etag" => "\"ebdeb717fe19444c308e608728569d5a\"",
|
27
|
+
"x-oauth-scopes" => "repo",
|
28
|
+
"x-ratelimit-remaining" => "4996",
|
29
|
+
"x-accepted-oauth-scopes" => "repo",
|
30
|
+
"content-length" => "192"},
|
31
|
+
:response => ""
|
32
|
+
}
|