Skip to content

Conversation

@mdrohmann
Copy link
Contributor

@mdrohmann mdrohmann commented Jan 5, 2021

@mdrohmann mdrohmann force-pushed the martind/pull-set-project-176209787 branch from ac9a195 to 2e31f76 Compare January 6, 2021 19:27
@mdrohmann mdrohmann force-pushed the martind/pull-set-project-176209787 branch from 2e31f76 to f89442a Compare January 6, 2021 19:27
if params.SetProject != "" {
related, err := areCommitsRelated(*target.CommitID, p.project.CommitUUID())
if !related && !params.Force {
confirmed, err := p.prompt.Confirm(locale.T("confirm"), locale.Tl("confirm_unrelated_pull_set_project", "If you switch to {{.V0}}, you may lose changes to your project.", target.String()), false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing the "Are you sure you want to do this?" Otherwise we're just prompting them for yes/no without actually giving them a prompt.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good point!

}
}

err = p.project.Source().SetNamespace(target.Owner, target.Project)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be redundant with line 97

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks for catching. Line 97 should never have been there...

@mdrohmann mdrohmann requested a review from Naatan January 8, 2021 19:28
Naatan
Naatan previously approved these changes Jan 8, 2021
@mdrohmann
Copy link
Contributor Author

I had to merge with master to update the confirmation prompt, and also noticed that I accidentally added a commit from my other PR. That is reverted now.

@mdrohmann mdrohmann merged commit a80cd09 into master Jan 8, 2021
@mdrohmann mdrohmann deleted the martind/pull-set-project-176209787 branch January 8, 2021 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants