Skip to content

Commit c97179e

Browse files
authored
Fix: Append /api/v3 to GitHub Enterprise URL (#432)
Original PR by @lehmanju #431
1 parent b826584 commit c97179e

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## [2.1.2]
4+
5+
- **Fix** - GitHub enterprise url missing /api/v3
6+
37
## [2.1.1]
48

59
- **Fix** - GitHub enterprise url wrong with app authentication

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "grafana-github-datasource",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"private": true,
55
"description": "The GitHub data source plugin for Grafana lets you to query the GitHub API in Grafana so you can visualize your GitHub repositories and projects.",
66
"repository": "github:grafana/github-datasource",

pkg/github/client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func createAppClient(settings models.Settings) (*Client, error) {
8888
}, nil
8989
}
9090

91-
itr.BaseURL = settings.GitHubURL
91+
itr.BaseURL = fmt.Sprintf("%s/api/v3", settings.GitHubURL)
9292

9393
return useGitHubEnterprise(httpClient, settings)
9494
}

0 commit comments

Comments
 (0)