Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix project lookup during fork #602

Merged
merged 1 commit into from
Feb 25, 2021

Conversation

bmeneg
Copy link
Collaborator

@bmeneg bmeneg commented Feb 25, 2021

Check if the project the user wants to fork matches the project that another fork, with the same name, was based on.

@bmeneg bmeneg requested a review from zaquestion February 25, 2021 21:07
During a fork process, lab doesn't check if a fork with same name under
user's namespace is a fork from the same project the user is trying to fork
now. If the same name matches, it only return a reference for that project,
regardless where it came from.

This patch adds a check step to make sure the found project is indeed a fork
for the same project being forked. Otherwise, it returns an error informing
the user.

Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
@bmeneg bmeneg force-pushed the fix-fork-findproject branch from 0b45299 to aafaffb Compare February 25, 2021 21:08
@bmeneg
Copy link
Collaborator Author

bmeneg commented Feb 25, 2021

Oops.. the commit " Completely drop hub support " was meant to another PR in the near future.
For now, it can be ignored :)

@codecov
Copy link

codecov bot commented Feb 25, 2021

Codecov Report

Merging #602 (aafaffb) into master (f551b39) will decrease coverage by 0.18%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #602      +/-   ##
==========================================
- Coverage   57.57%   57.39%   -0.19%     
==========================================
  Files          67       68       +1     
  Lines        4347     4354       +7     
==========================================
- Hits         2503     2499       -4     
- Misses       1602     1612      +10     
- Partials      242      243       +1     
Impacted Files Coverage Δ
internal/gitlab/gitlab.go 7.64% <0.00%> (-0.04%) ⬇️
cmd/fork.go 53.84% <0.00%> (-5.13%) ⬇️
cmd/util.go 72.69% <0.00%> (ø)
cmd/util_unix.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f551b39...aafaffb. Read the comment docs.

@bmeneg bmeneg merged commit 80edd01 into zaquestion:master Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants