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

Handle a couple of edge cases #94

Merged
merged 2 commits into from
Apr 28, 2021
Merged

Handle a couple of edge cases #94

merged 2 commits into from
Apr 28, 2021

Conversation

dominykas
Copy link
Member

@dominykas dominykas commented Apr 18, 2021

This is mostly to get by brain working to figure out what to do when a target branch already exists.

'use strict'

/**
* Mocks of HTTP calls for "wiby result" command positive flow
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it worth to drop few additional words here about this new flow?

@ghinks
Copy link
Contributor

ghinks commented Apr 27, 2021

I pulled it down locally and ran and verified it. Even against node 16.

The intent to check to see if the branch already exists and then to set the pipeline status enum to MISSING is clear.

This is a general comment, not specific to this PR, our tests are getting complicated and at some point will reach the very difficult to understand stage. For now not an issue, but my counsel is that if this were to become successful and adopted some re-work may be necessary.

Copy link
Contributor

@ghinks ghinks left a comment

Choose a reason for hiding this comment

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

I'm good with these changes, at some point in the future the tests will need re-structuring or documenting so that others can follow in our footsteps.

@dominykas
Copy link
Member Author

Agreed on the testing bit. The amount of mocks one has to set up when testing things like this is quite annoying... but testing against a real GH API is also not exactly viable, since you end up with failures due to networking flakes, and it's hard to also ensure a clean slate, and then you also can't run many things in parallel...

So yeah, no easy solution. But we'll come up with something eventually, I'm sure.

@dominykas dominykas merged commit 8bb3136 into main Apr 28, 2021
@dominykas dominykas deleted the branch-naming branch April 28, 2021 10:56
@dominykas
Copy link
Member Author

🎉 This PR is included in version 0.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants