bridgy icon indicating copy to clipboard operation
bridgy copied to clipboard

github publish: handle repos with >100 labels

Open snarfed opened this issue 7 years ago • 2 comments

@tantek recently published http://tantek.com/2018/074/b2/css-color-3-needs-link-editor-draft to https://github.com/w3c/csswg-drafts/issues/2445 (log), which included the css-color-3 and Needs Edits labels, but only css-color-3 actually got attached to the github issue.

this is because i use github's GraphQL API to fetch the repo's labels, and it limits results to 100 items, and the csswg-drafts repo has more than 100 labels. (!)

i guess i should detect this and fetch more pages of labels when necessary. whee!

snarfed avatar Mar 22 '18 00:03 snarfed

Here is another more recent example:

<http://tantek.com/2018/190/b1/scrollbar-gutter-move-to-css-scrollbars>

New issue, with two labels: css-overflow-4, css-scrollbars-1

Only the first label was added to the Bridgy Publish POSSE copy:

<https://github.com/w3c/csswg-drafts/issues/2899>

Is this the same problem? I thought perhaps with the switch from GraphQL to the GitHub v3 API a few weeks (months?) ago, this might have been fixed at the same time.

Whatever the cause is, some labels are still not getting through via publish.

(Originally published at: http://tantek.com/2018/193/t1/)

tantek avatar Jul 13 '18 06:07 tantek

heh, sorry for the trouble. yup, same missing feature, paging through multiple pages of labels past the first 100 for a repo. the recent switch from graphql to rest v3 api was just a couple calls, not the whole codebase, and the rest v3 api has the same max 100 item per page limit: https://developer.github.com/v3/guides/traversing-with-pagination/

snarfed avatar Jul 13 '18 17:07 snarfed