Skip to content

Check for Nearby Chapters#753

Open
CrisNevares wants to merge 5 commits into
cncf:mainfrom
CrisNevares:main
Open

Check for Nearby Chapters#753
CrisNevares wants to merge 5 commits into
cncf:mainfrom
CrisNevares:main

Conversation

@CrisNevares

Copy link
Copy Markdown
Contributor

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).

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>
@tegioz

tegioz commented Jun 9, 2026

Copy link
Copy Markdown

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 :)

@CrisNevares

Copy link
Copy Markdown
Contributor Author

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>
@CrisNevares

Copy link
Copy Markdown
Contributor Author

@tegioz Feedback addressed! Ready for your review

@tegioz

tegioz commented Jun 15, 2026

Copy link
Copy Markdown

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.

group_category[0]=regional

The rest looks good to me πŸ™‚

Signed-off-by: Cris Nevares <crisnevares@gmail.com>
@CrisNevares

Copy link
Copy Markdown
Contributor Author

@tegioz Update made to apply the regional filter on the initial query

@tegioz tegioz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me @CrisNevares πŸ‘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants