-
Notifications
You must be signed in to change notification settings - Fork 0
Sync GitHub comment edits to Slack #4
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Slack conversations.replies API pagination next_cursor limit💡 Result:
conversations.repliesuses cursor-based pagination:channel,ts, and optionallylimit(page size). Example:limit=200(Slack recommends ≤200). The method’s general maximum is documented as1000, but see the non‑Marketplace note below. [1][2]response_metadata.next_cursorfrom the response, then call again withcursor=<next_cursor>(and the samelimit). Repeat untilnext_cursoris missing/null/empty string (""). [1][3]limititems—Slack may return fewer (even 0) while still providing anext_cursor. Always key offnext_cursor. [2][3]=; when sending as a URL query parameter, encode it (e.g.,=→%3D). [3]Important (rate-limit-driven limit change): For apps commercially distributed outside the Slack Marketplace, Slack reduced the default and maximum
limitforconversations.repliesto 15 and rate-limited the method to 1 request/min for certain apps/installations (see Slack’s changelog and method docs for applicability dates). [1][4]Minimal pagination loop (pseudo):
cursor = nullconversations.replies(channel, ts, limit, cursor?)cursor = response.response_metadata.next_cursorcursoris empty → done; else repeat. [1][3]Sources:
[1] Slack method docs:
conversations.replieshttps://api.slack.com/methods/conversations.replies[2] Slack Conversations API pagination notes https://api.slack.com/conversations-api
[3] Slack pagination guide https://docs.slack.dev/apis/web-api/pagination/
[4] Slack changelog (rate limit + limit=15 for non‑Marketplace) https://api.slack.com/changelog/2025-05-terms-rate-limit-update-and-faq
Paginate replies to avoid missing edited messages in long threads.
conversations.repliesis capped at 200 (or 15 for non-Marketplace apps); if a thread exceeds that, the target message won't be found and edits will post a duplicate reply instead of updating in place. Implement cursor-based pagination usingresponse_metadata.next_cursor.One detail: URL-encode the cursor when passing it as a query parameter (e.g.,
=→%3D), since cursor strings often contain special characters.🧭 Suggested pagination pattern
Note: Consider URL-encoding the cursor parameter if special characters cause issues.
🤖 Prompt for AI Agents