Repository navigation
feat(ci): notify Feishu for new pull requests - #270
Merged
Merged
Conversation
agnitum2009
pushed a commit
to agnitum2009/openpi
that referenced
this pull request
Aug 29, 2026
* feat(ci): notify Feishu for new pull requests * feat(ci): localize Feishu PR notification * fix(ci): sanitize Feishu PR notifications --------- Co-authored-by: tt-a1i <[email protected]> Co-authored-by: tt-a1i <[email protected]> (cherry picked from commit fa21062)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
New pull requests were not announced automatically in the project Feishu group, and public PR metadata could be interpreted as Feishu text markup if forwarded verbatim.
Value
The repository can notify the Feishu group immediately while keeping the webhook and signing secret protected, while hostile titles or other metadata cannot inject mentions or extra message fields.
Approach
Add a
pull_request_targetworkflow for opened and ready-for-review events. It checks out only the trustedgithub.workflow_shawith credentials disabled, never PR code, then signs and sends a bounded six-line plain-text notification. All public PR metadata is projected through a Unicode-aware sanitizer before the HTTP payload is built. The workflow accepts both current and legacy Feishu success response formats.Validation
bun run check: passed (258 files)bun run test: passed (966 passed, 1 skipped)git diff --check: passedImpact
User-visible behavior: Feishu receives one message for newly opened non-draft PRs and another whenever a draft is marked ready. Repeated draft-to-ready transitions intentionally produce repeated notifications.
Model-visible context/tools: None.
Runtime/lifecycle: Adds one bounded GitHub Actions job per relevant PR event.
Persisted config/data: Requires
FEISHU_PR_BOT_WEBHOOKandFEISHU_PR_BOT_SECRETrepository secrets.Compatibility or risk: Benign notification text, signing, response handling, and missing/partial-secret behavior are preserved. Hostile, control, bidi, and overlong metadata is safely bounded.