Commit 8deffb3e authored by Greg Messner's avatar Greg Messner
Browse files

Added createVariable() and updateVariable() methods without the environmentScope param (#330).

parent 04561b0f
......@@ -2494,6 +2494,24 @@ public class ProjectApi extends AbstractApi implements Constants {
* @param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required
* @param value the value for the variable, required
* @param isProtected whether the variable is protected, optional
* @return a Variable instance with the newly created variable
* @throws GitLabApiException if any exception occurs during execution
*/
public Variable createVariable(Object projectIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiException {
return (createVariable(projectIdOrPath, key, value, isProtected, null));
}
/**
* Create a new project variable.
*
* <p>NOTE: Setting the environmentScope is only available on GitLab EE.</p>
*
* <pre><code>GitLab Endpoint: POST /projects/:id/variables</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required
* @param value the value for the variable, required
* @param isProtected whether the variable is protected, optional
* @param environmentScope the environment_scope of the variable, optional
* @return a Variable instance with the newly created variable
* @throws GitLabApiException if any exception occurs during execution
......@@ -2518,7 +2536,25 @@ public class ProjectApi extends AbstractApi implements Constants {
* @param key the key of an existing variable, required
* @param value the value for the variable, required
* @param isProtected whether the variable is protected, optional
* @param environmentScope the environment_scope of the variable, optional
* @return a Variable instance with the updated variable
* @throws GitLabApiException if any exception occurs during execution
*/
public Variable updateVariable(Object projectIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiException {
return (updateVariable(projectIdOrPath, key, value, isProtected, null));
}
/**
* Update a project variable.
*
* <p>NOTE: Updating the environmentScope is only available on GitLab EE.</p>
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/variables/:key</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param key the key of an existing variable, required
* @param value the value for the variable, required
* @param isProtected whether the variable is protected, optional
* @param environmentScope the environment_scope of the variable, optional.
* @return a Variable instance with the updated variable
* @throws GitLabApiException if any exception occurs during execution
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment