.setDescription("Get the client id of a Github ALM Integration.")
.setInternal(true)
.setSince("8.4")
+ .setResponseExample(getClass().getResource("example-get_github_client_id.json"))
.setHandler(this);
action.createParam(PARAM_ALM_SETTING)
.setDescription("List GitHub organizations<br/>" +
"Requires the 'Create Projects' permission")
.setInternal(true)
+ .setResponseExample(getClass().getResource("example-list_github_organizations.json"))
.setSince("8.4")
.setHandler(this);
"Requires the 'Create Projects' permission")
.setInternal(true)
.setSince("8.4")
+ .setResponseExample(getClass().getResource("example-list_github_repositories.json"))
.setHandler(this);
action.createParam(PARAM_ALM_SETTING)
.setDescription("Count number of project bound to an ALM setting.<br/>" +
"Requires the 'Administer System' permission")
.setSince("8.1")
- .setResponseExample(getClass().getResource("count_binding-example.json"))
+ .setResponseExample(getClass().getResource("example-count_binding.json"))
.setHandler(this);
action
.setDescription("Get ALM binding of a given project.<br/>" +
"Requires the 'Administer' permission on the project")
.setSince("8.1")
- .setResponseExample(getClass().getResource("get_binding-example.json"))
+ .setResponseExample(getClass().getResource("example-get_binding.json"))
.setChangelog(new Change("8.6", "Azure binding now contains the project and repository names"))
.setChangelog(new Change("8.7", "Azure binding now contains a monorepo flag for monorepo feature in Enterprise Edition and above"))
.setHandler(this);
.setDescription("List ALM setting available for a given project, sorted by ALM key<br/>" +
"Requires the 'Administer project' permission if the '" + PARAM_PROJECT + "' parameter is provided, requires the 'Create Projects' permission otherwise.")
.setSince("8.1")
- .setResponseExample(getClass().getResource("list-example.json"))
+ .setResponseExample(getClass().getResource("example-list.json"))
.setHandler(this);
action
.setChangelog(new Change("8.2", "Field 'URL' added for GitLab definitions"),
new Change("8.6", "Field 'URL' added for Azure definitions"),
new Change("8.7", "Fields 'personalAccessToken', 'privateKey', and 'clientSecret' are no longer returned"))
- .setHandler(this);
+ .setHandler(this)
+ .setResponseExample(getClass().getResource("example-list_definitions.json"));
}
@Override
.setDescription("Validate an ALM Setting by checking connectivity and permissions<br/>" +
"Requires the 'Administer System' permission")
.setSince("8.6")
+ .setResponseExample(getClass().getResource("example-validate.json"))
.setHandler(this);
action.createParam(PARAM_KEY)
context.createAction("search_templates")
.setDescription("List permission templates.<br />" +
"Requires the following permission: 'Administer System'.")
- .setResponseExample(getClass().getResource("search_templates-example.json"))
+ .setResponseExample(getClass().getResource("search_templates-example-without-views.json"))
.setSince("5.2")
.addSearchQuery("defau", "permission template names")
.setHandler(this);
.setSince("7.2")
.setDescription("Download plugin JAR, for usage by scanner engine")
.setInternal(true)
+ .setResponseExample(getClass().getResource("example-download.json"))
.setHandler(this);
action.createParam(PLUGIN_PARAM)
--- /dev/null
+{
+ "clientId": "Iv1.3123456789af"
+}
--- /dev/null
+{"paging":{"pageIndex":1,"pageSize":100,"total":1},"organizations":[{"key":"org1","name":"My organization"}]}
--- /dev/null
+{"paging":{"pageIndex":1,"pageSize":30,"total":3},"repositories":[{"id":1,"key":"org/repo1","name":"repo1","url":"https://github.com/org/repo1"},{"id":2,"key":"org/repo2","name":"repo2","url":"https://github.com/org/repo2"},{"id":3,"key":"org/repo3","name":"repo3","url":"https://github.com/org/repo3"}]}
--- /dev/null
+{
+ "key": "gh1",
+ "projects": 4
+}
--- /dev/null
+{
+ "key": "gh1",
+ "alm": "github",
+ "repository": "repo1",
+ "url": "https://api.github.com",
+ "summaryCommentEnabled": true,
+ "monorepo": false
+}
--- /dev/null
+{
+ "almSettings": [
+ {
+ "key": "gh1",
+ "alm": "github",
+ "url": "https://api.github.com"
+ }
+ ]
+}
--- /dev/null
+{
+ "github": [
+ {
+ "key": "gh1",
+ "url": "https://api.github.com",
+ "appId": "12345",
+ "clientId": "Iv1.12345c6789az"
+ }
+ ],
+ "azure": [ ],
+ "bitbucket": [ ],
+ "gitlab": [ ],
+ "bitbucketcloud": [ ]
+}
--- /dev/null
+{"errors":[{"msg":"Failed to check permissions with Github, check the configuration"}]}