notion-sdk-py icon indicating copy to clipboard operation
notion-sdk-py copied to clipboard

Add a GitHub CI cron job that open issues here for new Notion API changelog entries

Open ramnes opened this issue 1 year ago • 6 comments

Most of the development / maintenance of this package is tied to Notion API changelog.

I already receive a notification every time a change happens in notion-sdk-js (watch ramnes/notion-sdk-js if you want them too), but sometime I misinterpret a commit and skip important changes.

A new issue here every time there's a new entry in the official changelog would be a better way to follow upstream changes!

ramnes avatar May 17 '24 13:05 ramnes

Glad that this project is active :)

trancethehuman avatar Jun 10 '24 23:06 trancethehuman

Yes, it is. I would just like to see a bit more contributions from the community, I'm feeling quite alone these days. :)

ramnes avatar Jun 11 '24 07:06 ramnes

@ramnes do you have a list of issues for newcomers? I'll pick a few and work on them.

About to build Notion integration in my FastAPI app this month.

trancethehuman avatar Jun 11 '24 14:06 trancethehuman

Any issue with the good first issue tag!

https://github.com/ramnes/notion-sdk-py/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

ramnes avatar Jun 11 '24 15:06 ramnes

Has anyone already taken it? If not, I would like to try to make a contribution.

AlexPantyukhin13 avatar Aug 01 '24 11:08 AlexPantyukhin13

Go ahead!

ramnes avatar Aug 01 '24 12:08 ramnes

Hey @ramnes,

I recently started using this library for a project and thought I’d try to give back! I saw this issue and put together a potential solution in my fork here.

What I did:

  • Wrote a script that grabs the changelog, convert HTML to Markdown, saves it to a file to track what’s already been processed and opens issues only for new updates (here two examples).

  • Added a workflow to run the script every night.

Let me know what you think about this solution. Happy to tweak it or clean things up and open a PR if it seems useful.

MassimoGennaro avatar Dec 21 '24 09:12 MassimoGennaro

Hey @MassimoGennaro,

That's awesome, thank you so much for the help! It definitely seems useful, and I'd be really happy to get this merged. :)

Top of mind right now:

  • What would you think if we'd save less, e.g. only the date, title, and content md5?
  • I think it would be great to save the original blog post URL (using their anchor) and add it to the bottom of the issue.
  • We really need to make sure the script fails if their HTML structure changes, so that we can adapt and avoid doing crazy things with GitHub's API.

Don't feel obliged to make these changes, but please open a PR. Thanks again!

ramnes avatar Dec 21 '24 23:12 ramnes

Hi @ramnes I had some spare time and work on the changes.

  • Now we save only date, title, and content md5 on the known_entries.json file (example here). The content md5 is also used to identify new entries.
  • The issue now contains the anchor URL the the original changelog entry and I assumed that a new label changelog can be added to tag these kind of issues (example here). If you agree, please remember to add this new label 😉
  • Now the script has some exception handlers to interrupt it when errors occur (including not expected HTML structure)

I tested it on my fork and everything seems working fine. I'm opening a PR!

MassimoGennaro avatar Dec 22 '24 11:12 MassimoGennaro

Implemented by @MassimoGennaro in #244. Thanks again!

ramnes avatar Dec 30 '24 19:12 ramnes