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 default_branch and topics in Repository #690

Conversation

abestel
Copy link

@abestel abestel commented Sep 15, 2021

No description provided.

@abestel
Copy link
Author

abestel commented Sep 15, 2021

Looking in https://github.com/github/rest-api-description it is safe to assume that default_branch is required and always returned.
Topics is optional, and I thought it was nicer to expose a List.empty[String] instead of a Option[List[String]] in the domain object.

@juanpedromoreno juanpedromoreno added the breaking-change A breaking change that needs to be treated with consideration label Sep 15, 2021
@juanpedromoreno
Copy link
Member

Thanks @abestel , would we need to update also the docs?

@abestel
Copy link
Author

abestel commented Sep 16, 2021

Thanks @abestel , would we need to update also the docs?

Thanks for checking my PR @juanpedromoreno :-)
I checked the documentation before submitting this change, and I don't think there's anything to update. The page for the repositories related actions is here and the model is referenced by linking directly to the actual source code, ie here.

I don't really understand why the Github Worflow failed by the way

Copy link
Member

@juanpedromoreno juanpedromoreno left a comment

Choose a reason for hiding this comment

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

The pipeline failed for an unrelated issue, no worries about that, I checked your PR and everything looks right.

@@ -30,11 +30,13 @@ final case class RepositoryBase(
updated_at: String,
pushed_at: String,
status: RepoStatus,
default_branch: String,
Copy link
Member

Choose a reason for hiding this comment

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

question: Would it make sense to add the new fields at the end? Thinking about an easier way to upgrade for people using the existing model :)

Copy link
Author

Choose a reason for hiding this comment

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

I like to keep the required fields before the fields having a default value (hence the default_branch here and the topics all the way down) but I can definitely change it if you think it would be better :-)

Copy link
Member

Choose a reason for hiding this comment

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

Your point makes sense to me too, let's keep it that way 👍

Copy link
Member

@juanpedromoreno juanpedromoreno left a comment

Choose a reason for hiding this comment

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

Thanks so much for your time @abestel !

@juanpedromoreno juanpedromoreno merged commit 9c121b4 into 47degrees:main Sep 16, 2021
@abestel abestel deleted the feature/add_topics_and_default_branch_to_repo branch September 16, 2021 11:02
abestel pushed a commit to abestel/github4s that referenced this pull request Sep 16, 2021
- Decoders was badly formatted after 47degrees#690
- Integration tests were failing, it seems, because of the move from `master` to `main`
@abestel abestel mentioned this pull request Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change A breaking change that needs to be treated with consideration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants