PluginProbe
Github Embed / 1.9
Github Embed v1.9
trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.0.1 2.0.2 2.1.0 2.2.0 2.2.1
← All changes | github-api.php +0 -14 1.81.9 View file →
@@ -103,11 +103,8 @@
103 103 public function get_repo( $owner, $repository ) {
104 104
105 105 $this->log( "get_repo( $owner, $repository )", GEDEBUG_CALL );
106 106
107 - $owner = trim( $owner, '/' );
108 - $repository = trim( $repository, '/' );
109 -
110 107 $results = $this->call_api( "https://api.github.com/repos/$owner/$repository" );
111 108
112 109 return json_decode( $results['body'] );
113 110
@@ -124,11 +121,8 @@
124 121 public function get_repo_commits( $owner, $repository ) {
125 122
126 123 $this->log( "get_repo_commits( $owner, $repository )", GEDEBUG_CALL );
127 124
128 - $owner = trim( $owner, '/' );
129 - $repository = trim( $repository, '/' );
130 -
131 125 $results = $this->call_api( "https://api.github.com/repos/$owner/$repository/commits" );
132 126
133 127 return json_decode( $results['body'] );
134 128
@@ -146,11 +140,8 @@
146 140 public function get_repo_milestone_summary( $owner, $repository, $milestone ) {
147 141
148 142 $this->log( "get_repo_milestone_summary( $owner, $repository, $milestone )", GEDEBUG_CALL );
149 143
150 - $owner = trim( $owner, '/' );
151 - $repo = trim( $repository, '/' );
152 -
153 144 $results = $this->call_api( "https://api.github.com/repos/$owner/$repository/milestones/$milestone" );
154 145
155 146 return json_decode( $results['body'] );
156 147
@@ -161,11 +152,8 @@
161 152 public function get_repo_contributors( $owner, $repository ) {
162 153
163 154 $this->log( "get_repo_contributors( $owner, $repository )", GEDEBUG_CALL );
164 155
165 - $owner = trim( $owner, '/' );
166 - $repo = trim( $repository, '/' );
167 -
168 156 $results = $this->call_api( "https://api.github.com/repos/$owner/$repository/stats/contributors" );
169 157
170 158 return json_decode( $results['body'] );
171 159
@@ -180,10 +168,8 @@
180 168 */
181 169 public function get_user( $user ) {
182 170
183 171 $this->log( "get_user( $user )", GEDEBUG_CALL );
184 -
185 - $user = trim( $user, '/' );
186 172
187 173 $results = $this->call_api( "https://api.github.com/users/$user" );
188 174
189 175 return json_decode( $results['body'] );