Skip to content
Snippets Groups Projects

Remove fork relationship from projects settings #2578

What does this MR do?

Adds the ability for project owners to remove the forked relationship to the source project via the Project > Settings screen. This was from an issue request #2578 (closed).

I worked on this MR with @DouweM.

Where should the reviewer start?

There's a new controller action projects#remove_fork and changes to the edit view to provide the new context. The logic was taken form the exiting API.

How should this be manually tested?

  1. As a logged in user fork a project from another namespace
  2. Visit the settings page for that newly fork project
  3. You should be given the option to Remove forked relationship with a confirmation.
  4. A flash message should appear when complete.

Screenshots

Screen_Shot_2015-10-13_at_9.43.02_PM

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Douwe Maan
    Douwe Maan @DouweM started a thread on the diff
  • 62 62 expect(user.starred?(public_project)).to be_falsey
    63 63 end
    64 64 end
    65
    66 describe "PUT remove_fork" do
    67 context 'when signed in' do
    68 before do
    69 sign_in(user)
    70 end
    71
    72 context 'with forked project' do
    73 let(:project_fork) { create(:project, namespace: user.namespace) }
    74
    75 it 'should remove fork from project' do
    76 create(:forked_project_link, forked_to_project: project_fork)
  • Thanks @hanloong!

  • Added 1 commit:

    • 27fce2b7 - Made suggested content changes based on MR Review
  • Added 1 commit:

    • 0bea5ced - Made suggested content changes based on MR Review
  • Okay those suggested changes have been pushed. Hopefully CI should pass now

  • Added 188 commits:

    • 0bea5ced...c856a7a5 - 187 commits from branch gitlab-org:master
    • 02e8beaa - Merge branch 'master' into remove-forks-from-projects-settings
  • Douwe Maan mentioned in merge request !1636 (merged)

    mentioned in merge request !1636 (merged)

  • Replaced by !1636 (merged).

  • Douwe Maan Status changed to closed

    Status changed to closed

  • Douwe Maan mentioned in commit 8adeda37

    mentioned in commit 8adeda37

  • Please register or sign in to reply
    Loading