Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
Fix REST API calls for projects with '/' in the name
Change-Id: I05e8a93ef5fec621ad0d5c47909fb581e871d518
diff --git a/src/main/resources/static/gr-lfs-project-info.js b/src/main/resources/static/gr-lfs-project-info.js
index ce733b9..8eff229 100644
--- a/src/main/resources/static/gr-lfs-project-info.js
+++ b/src/main/resources/static/gr-lfs-project-info.js
@@ -28,8 +28,9 @@
},
_getPreferences() {
+ let encodedRepoName = encodeURIComponent(this.repoName);
return this.plugin.restApi('/projects/')
- .get(`${this.repoName}/${this.plugin.getPluginName()}~lfs:config-project`)
+ .get(`${encodedRepoName}/${this.plugin.getPluginName()}~lfs:config-project`)
.then(config => {
if (!config || Object.entries(config).length === 0) {
this.$.lfsProjectInfo.hidden = true;