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: update typing for not-yet published stories #780

Conversation

finnboeger
Copy link
Contributor

Pull request type

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Other (please describe):

How to test this PR

Create a new story in the root directory (and only save it, don't publish it) and access its draft version via the API. The response should contain the following null values that are not yet reflected in the typing:

{
   "story":{
      ...
      "parent_id": null,
      ...
      "first_published_at":null,
      "release_id":null,
      ...
      "default_full_slug":null,
      "translated_slugs":null
   },
   ...
}

What is the new behavior?

fields can now be null according to the typing

Other information

I've missed those fields in #763 as I only checked for published stories, this should now cover all story states.

It may be a good idea to split between Published/Non-Published state but that's probably something for usages of the library as it would be a big change.

@finnboeger
Copy link
Contributor Author

Could somebody please take a look at this PR? (Maybe @alvarosabu ?)

@alvarosabu
Copy link
Contributor

Hi @finnboeger thanks for submitting this PR, I am having issues running the tests, because the branch is called finn/fix-typing instead of a conventional commit format like feat/ or fix/ in this case. Also it will not trigger a release if we merge it.

More info here https://www.conventionalcommits.org/en/v1.0.0/

Would you be so kind as to create a new branch with your changes and change this PR origin to it?

Thanks

@finnboeger finnboeger closed this Oct 16, 2024
@finnboeger finnboeger deleted the finn/fix-typing-first-published-at branch October 16, 2024 14:53
@finnboeger finnboeger restored the finn/fix-typing-first-published-at branch October 16, 2024 14:54
@finnboeger finnboeger reopened this Oct 16, 2024
@finnboeger
Copy link
Contributor Author

As changing the to-be-merged branch is not possible, I'm closing this in favor of #862

@finnboeger finnboeger closed this Oct 16, 2024
@finnboeger finnboeger deleted the finn/fix-typing-first-published-at branch October 16, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants