-
Notifications
You must be signed in to change notification settings - Fork 27
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
Check if a library repo has updates but no release. #18
Comments
I've got an early iteration running for this. It's using two API requests:
This is the only approach I could discern from the available API requests. The downsides are that it can increase the API requests by two for each repo (approx 800 total for 100+ repos; ~600 total without this), and also increases the time it takes adabot to run. Not huge deal breakers... Now, with # 2, I'd like to filter the commits and ignore things that don't need releases; like Wanted to ask if those are acceptable trade-offs... @kattni @tannewt EDIT: filtering by filenames in a commit (should've added repo name..hard to read the full func tree) Getting info for commit: d972354bb1317278eac020ac879569be93564690
> Commit files: .pylintrc
4500 requests remaining this hour
Getting info for commit: 61abf4100c4f18c42a43d188429a275bf105781d
> Commit files: .pylintrc
Getting info for commit: c64d6f7fc14225655510947fc42b812caf359f67
> Commit files: .travis.yml, README.rst
Getting info for commit: 02ed2b572f65cb4f0cc39be39e5317cc6490c0e6
> Commit files: .travis.yml
Getting info for commit: 15ab6f55d3e5eeaffaff8e1f171070ec2f03fe75
> Commit files: README.rst
Getting info for commit: 6f61755886f77bb311c383c05cb747069767ed54
> Commit files: .pylintrc
Getting info for commit: 1c8dade7c005ec21434e33f4a7355e06ee17a561
> Commit files: .pylintrc
Getting info for commit: b742c92eb7031d59a1a6f528db6b8013335208a3
> Commit files: .pylintrc
Getting info for commit: 1c16273204eb05351cb8ab17779d6d80d042eb53
> Commit files: .pylintrc
Getting info for commit: 8a9647bcc4a34a438106a301c35c9773b3e46d10
> Commit files: adafruit_tsl2591.py
Getting info for commit: 584a24f3bc914618d15683a45fd1fe17373fbaab
> Commit files: adafruit_tsl2591.py |
I was hoping this would be a single call to the API. I wonder how they do it for the releases page. You are right that it takes multiple calls as is. I'd probably use the git commit hash instead because dates can get funny with commit ordering (merge and rebase can do funny things). That'll take three calls I think. release -> tag -> commit list. I wouldn't bother with trying to detect commits we don't need to release. Instead, lets make releasing so easy we can do it on everything as needed. |
So was I. But it turns out, we're in a little bit of luck. I didn't look close enough, or maybe outside of the box enough. Compare two commits to the rescue! Examples:
Back the compare up to the release-tag-before-last:
Ca ching! Keeps us at two API requests: 1) get latest release tag, 2) compare to master. I might be able to get the list of commits; docs say something about passing the correct 'media_type'. Will keep digging.
Yeah, that's what lead me to believe there was some one-request-magic. Looking at a release page's source...there is a lot of buried JS on the server side, so they're keeping that secret to themselves. |
Two is awesome! Great find @sommersoft |
After the initial addition of a library to the bundle, any new release of that library will generate an update to the bundle. However, there are sometimes where a library has received some updates, but no release is done. This could be intentional or accidental.
Add some kind of check that can warn when this situation exists for any library included in the bundle.
The text was updated successfully, but these errors were encountered: