PluginProbe
Github Embed / 1.7
Github Embed v1.7
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 +8 -6 1.41.7 View file →
@@ -1,19 +1,21 @@
1 1 <?php
2 2
3 3
4 4
5 -// 0 - none
5 +// 0 - none.
6 6 define( 'GEDEBUG_NONE', 0 );
7 7
8 -// 1 - call logging only
8 +// 1 - call logging only.
9 9 define( 'GEDEBUG_CALL', 1 );
10 10
11 -// 2 - calls, and responses
11 +// 2 - calls, and responses.
12 12 define( 'GEDEBUG_RESP', 2 );
13 13
14 -// Selected debug level
15 -define( 'GITHUB_API_LEVEL', GEDEBUG_NONE );
14 +// Selected debug level.
15 +if ( ! defined( 'GITHUB_API_LEVEL' ) ) {
16 + define( 'GITHUB_API_LEVEL', GEDEBUG_NONE );
17 +}
16 18
17 19
18 20 /**
19 21 * This class contains all the functions that actually retrieve information from the GitHub API
@@ -149,9 +151,9 @@
149 151
150 152 $this->log( "get_repo_milestone_summary( $owner, $repository, $milestone )", GEDEBUG_CALL );
151 153
152 154 $owner = trim( $owner, '/' );
153 - $repo = trim( $repo, '/' );
155 + $repo = trim( $repository, '/' );
154 156
155 157 $results = $this->call_api( "https://api.github.com/repos/$owner/$repository/milestones/$milestone" );
156 158
157 159 return json_decode( $results['body'] );