-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fixes #957 #983
Fixes #957 #983
Conversation
Definitely gets the job done! Looking forward to this one getting released. I will say it does feel a bit cleaner to have each VCS client define their own pull request link format. Thinking ahead, I would have concerns about littering checks/tests/etc that are specific to a single VCS. In this case it's probably overkill to let a VCS define their own ProjectLocker, because the only difference is the PR link. Maybe its something we add into the |
Good point. I'll look into something a bit more general. |
Yeah this was an issue waiting to happen because it's coupled the error message with the markdown linking method of the VCS. Let's make vcs.Client a field of ProjectLocker and add a new method to the interface: This can then be used by the project locker: link := p.VCSClient.MarkdownPullLink(lockAttempt.CurrLock.Pull.Num)
failureMsg := fmt.Sprintf(
"This project is currently locked by an unapplied plan from pull %s. To continue, delete the lock from %s or apply that plan and merge the pull request.\n\nOnce the lock is released, comment `atlantis plan` here to re-plan.",
link,
link) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. You'll probably need to rebase off master to get the tests passing.
Sorry for the messy PR if there's a better way to rebase in this case. I'm getting some local errors trying to regen the mock client. Hopefully, I will sort this out quickly and push a fix. |
No worries, I always lean on my good friend squash merge. 😄 |
Sorry for the delay on this. I should be able to wrap it up this weekend. |
Codecov Report
@@ Coverage Diff @@
## master #983 +/- ##
==========================================
- Coverage 71.98% 71.96% -0.02%
==========================================
Files 65 65
Lines 5411 5429 +18
==========================================
+ Hits 3895 3907 +12
- Misses 1210 1215 +5
- Partials 306 307 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there
Co-Authored-By: Luke Kysow <1034429+lkysow@users.noreply.github.com>
Sounds good, thanks! |
How does this look for a solution to this issue?