maxime1992 / dev-to-git

Publish a blog post (markdown file) to Dev.to from your command line or from CI with this CLI
MIT License
27 stars 13 forks source link

handle 422 error after changes to dev.to api #37

Closed inverted-capital closed 3 years ago

inverted-capital commented 3 years ago

closes #35

The dev.to api has both changed, and has an invalid example.

It has changed to require the body_markdown to be nested with an article key, and it also will not accept front matter inside the body_markdown, requiring these attributes instead to be passed in as json, under the article key. This patch handles these changes. The error to their documentation has been reported here: https://github.com/forem/forem/issues/12712

chmod +x was added to the package.json file to allow debugging by running the file directly.

maxime1992 commented 3 years ago

Thanks a lot for the PR @evil-liskov! I'll take a look asap, may not be before the weekend though as I'm pretty busy atm :+1:

maxime1992 commented 3 years ago

Can you explain what's the minimal change that you want to bring in for this fix to work?

I feel like this MR is trying to do 2 things at once:

I could be wrong :)

But if that's the case I'd suggest to have one MR with the changes for this fix to be merged only and later on if you see some code to refactor do that in a different MR

gmarokov commented 3 years ago

Hi folks @inverted-capital, @maxime1992, What are the chances this MR to go in any time soon?

maxime1992 commented 3 years ago

Hello, I'm putting of lot of efforts into work already those days so I don't have any time at all TBH. If some wants to give a go at cleaning up the MR I could review though

maxime1992 commented 3 years ago

Done in https://github.com/maxime1992/dev-to-git/pull/44 :)

Thanks @inverted-capital to start this effort even though your PR didn't get merge! :blush: much appreciated