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

various fixes and tests for [githubpipenv] #7194

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

chris48s
Copy link
Member

Went digging into #7188 and some worms came out of the can 🐛

This PR closes #7188 , deals with a few other edge cases and adds a bunch of unit tests for the pipenv getDependencyVersion() helper, which did not previously have any.

@chris48s chris48s added the service-badge New or updated service badge label Oct 27, 2021
@shields-ci
Copy link

Messages
📖 ✨ Thanks for your contribution to Shields, @chris48s!

Generated by 🚫 dangerJS against fdea067

@chris48s
Copy link
Member Author

Package tests are failing with "infrastructure fail - Unexpected environment preparation error: failed to create host". I expect this is just Circle having a bit of a wobble. Will try restarting again later/tomorrow.

} else {
return { ref: ref.substring(1, 8) }
Copy link
Member

Choose a reason for hiding this comment

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

i realize now I'm even more confused by what we were doing before. any idea why we were substringing from this range before?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah sure I probably should have explained this more as there were 2 issues here:

  • 1 is that we were assuming ref is always a commit hash, whereas it can be a commit hash or a tag (or a branch name actually, now I think of it)
  • The other is that if it is a commit hash, we want the first 7 chars, whereas we were actually taking characters 2 though 8 which was passing the service test because we're just doing a picture check
    const isShortSha = Joi.string().regex(/[0-9a-f]{7}/)
    but was not actually correct.

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

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

inline question just trying to wrap my ahead around current behavior, but otherwise both code and live review app LGTM and address the bug

@chris48s chris48s merged commit 6e100bf into badges:master Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

github repo experiencing "invalid response data" for pipenv
4 participants