feat: trigger Sourcebot sync after Zoekt merges - #22
Merged
Conversation
| steps: | ||
| - name: Generate Sourcebot GitHub App token | ||
| id: app-token | ||
| uses: actions/create-github-app-token@v2 |
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.
Summary
Companion receiver: sourcebot-dev/sourcebot#1560
Validation
Configuration
Requires SOURCEBOT_SYNC_APP_ID and SOURCEBOT_SYNC_APP_PRIVATE_KEY Actions secrets. The app should be installed only on sourcebot-dev/sourcebot with Contents and Pull requests write access.
Note
Medium Risk
Uses
pull_request_targetwith repository secrets and a cross-repo GitHub App token; the design avoids PR checkout, but misconfigured secrets or app permissions could affect the downstream Sourcebot repo.Overview
Adds
sync-sourcebot.yml, a new GitHub Actions workflow that runs when a PR is closed and merged into the default branch.It mints a GitHub App token scoped to
sourcebot-dev/sourcebot(viaSOURCEBOT_SYNC_APP_ID/SOURCEBOT_SYNC_APP_PRIVATE_KEY) and POSTs azoekt-pr-mergedrepository dispatch with the merge commit SHA and Zoekt PR number. The workflow usespull_request_targetand does not check out PR code, so untrusted PR content is not executed while base-repo secrets can still be used for the cross-repo call.A step summary records that the dispatch was sent.
Reviewed by Cursor Bugbot for commit f4b645e. Bugbot is set up for automated code reviews on this repo. Configure here.