Check for Nearby Chapters#753
Conversation
Signed-off-by: Cris Nevares <crisnevares@gmail.com> Signed-off-by: Cris Nevares <crisnevares@gmail.com>
Signed-off-by: Cris Nevares <crisnevares@gmail.com>
Signed-off-by: Cris Nevares <crisnevares@gmail.com>
|
Hi @CrisNevares OCG provides a way of making this sort of queries directly (although it's not exposed in the UI at the moment). You can do something like this: curl --get 'https://ocgroups.dev/explore/groups/search' \
--header 'CloudFront-Viewer-Latitude: 40.7128' \
--header 'CloudFront-Viewer-Longitude: -74.0060' \
--data-urlencode 'distance=100000' \
--data-urlencode 'sort_by=distance' \
--data-urlencode 'limit=10'This should simplify things on your end a bit, and it'll make the process lighter on our side as well, as you won't need to pull all groups every time (it'll be heavier over time as the list grows) π (we'll update those headers names eventually, but it should work for now :) |
|
Thank you for the feedback @tegioz! I'm aiming to incorporate the feedback before the end of the week. |
Add retries Add /recheck comment functionality in case of ocgroups.dev call failures Signed-off-by: Cris Nevares <crisnevares@gmail.com>
|
@tegioz Feedback addressed! Ready for your review |
|
Hi @CrisNevares I'd also recommend applying the group category filter on the OCG API query, instead of filtering locally after fetching all results. As it is, you could receive a first page with lots of results to discard, leaving out valid ones. And the query is heavier than needed.
The rest looks good to me π |
Signed-off-by: Cris Nevares <crisnevares@gmail.com>
|
@tegioz Update made to apply the regional filter on the initial query |
This PR adds automation via a GitHub Action that will check for nearby chapters when an issue using the 'Cloud Native Community Group (CNCG) Chapter Request' template is created. If a nearby chapter is found, a comment is added by the Action linking to the existing chapter(s).