Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !8055

Closed
Created 10 years ago by Administrator@rootOwner
  • Report abuse
Report abuse

API: Implement edit via API for projects

  • Overview 5
  • Commits 1
  • Changes 4

Created by: mjmaenpaa

Implements edit via API for projects. Edit was part of missing features in feature request Full CRUD operations via API for projects. http://feedback.gitlab.com/forums/176466-general/suggestions/3904506-full-crud-operations-via-api-for-projects

Feature is implemented using existing UpdateService for projects. Permission to change visibility level and name are checked in addition to check for permission to administer project.

Doesn't allow updating project namespace id, because there was existing API-method for transferring project to a group.

Documentation added to doc/api/projects.md. Uses API request PUT /projects/:id .

Tests included for:

  1. Success for changing path
  2. Success for changing name
  3. Success for changing visibility level
  4. Success for changing all other attributes
  5. Success for changing name & path to existing name & path but in different namespace
  6. Failure if not authenticated
  7. Failure if path exists in project's namespace
  8. Failure if name exists in project's namespace
  9. Failure if not sufficient permission to change name
  10. Failure if not sufficient permission to change visibility level
  11. Failure if not sufficient permission to change other attributes

Allows updating following parameters:

  • name
  • path
  • visibility_level
  • public
  • default_branch
  • issues_enabled
  • wiki_enabled
  • snippets_enabled
  • merge_requests_enabled
  • description
  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Compare
  • master (base)

and
  • latest version
    8479e97d
    1 commit, 5 years ago

There are merge conflicts

The comparison view may be inaccurate due to merge conflicts.

Resolve these conflicts or ask someone with write access to this repository to merge it locally.

0 Assignees
Assign to
0 Reviewers
Request review from
Milestone
No milestone
None
None
Time tracking
0
Labels
None
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
participants
Reference:
Source branch: github/fork/mjmaenpaa/api_edit_projects

    0 pending comments