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 mongoDB not updating if internaldepURL changes #296

Merged
merged 3 commits into from Jul 15, 2019

Conversation

Krlier
Copy link
Contributor

@Krlier Krlier commented Jul 15, 2019

Closes #293

This PR aims to fix a bug in which internaldepURL would not be updated if the desired repository to be analyzes was already present in the database.

  • api/db/huskydb.go: Add internaldepURL to the insert analysis struct.
  • api/log/messagecodes.go: Add a new message code if huskyCI wasn't able to update a repository with a new internaldepURL.
  • api/routes/analysis.go: Add logic to update the database if internaldepURL value changes.
  • api/types/types.go: Add omitempty tag so internaldepURL won't show up in the database unless it's not empty.

@Krlier Krlier added the fix Bug fix label Jul 15, 2019
@Krlier Krlier requested a review from rafaveira3 July 15, 2019 18:54
Copy link
Contributor

@rafaveira3 rafaveira3 left a comment

Choose a reason for hiding this comment

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

Nice, @Krlier! I have tested your branch and it worked fine! Thanks for this. 🚀

@rafaveira3 rafaveira3 merged commit 57118b5 into master Jul 15, 2019
@rafaveira3 rafaveira3 deleted the fix-internaldepURL branch July 15, 2019 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update mongoDB if internaldepURL changes
2 participants