fix(gateway): handle bot review requests #60
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Slipstream/auto_review!60
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/review-request-webhooks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
pull_request.review_requestedwebhook targeting the configured bot login.Validation
nix develop -c cargo test -p ar-gateway review_requestednix develop -c cargo test -p ar-forgejo webhooknix develop -c cargo fmt --all -- --checknix develop -c cargo clippy -p ar-gateway -p ar-forgejo --all-targets -- -D warningsnix develop -c cargo nextest run -p ar-gateway -p ar-forgejoCloses #49.
This PR enhances the handling of Forgejo
pull_request.review_requestedwebhooks by dispatching reviews when the request targets the configured bot login, provided the PR is open and non-draft. It also introduces a new environment variableAR_FORGEJO_TOKENfor API authentication. The changes appear well-tested and documented, making the PR safe to merge.Walkthrough
CHANGELOG.md:
pull_request.review_requestedwebhooks and the introduction ofAR_FORGEJO_TOKEN.crates/ar-forgejo/src/webhook.rs:
stateandrequested_reviewerfields toPullRequestandPullRequestEventstructs.crates/ar-gateway/README.md:
review-request dispatchin the test coverage description.crates/ar-gateway/src/webhook.rs:
is_actionablefunction to include logic forReviewRequestedactions.docs/OPERATIONS.md:
pull_request.review_requestedwebhooks and theAR_FORGEJO_TOKENenvironment variable.Pre-merge checks
This PR enhances the gateway to handle
pull_request.review_requestedwebhooks for bot users, ensuring semantic reviews are dispatched for open, non-draft PRs. The changes appear well-tested and documented, making it safe to merge.Walkthrough
review_requestedwebhooks for bot users.PullRequestandPullRequestEventstructs to support the new webhook handling.is_actionablefunction to include logic forReviewRequestedactions, ensuring only relevant requests trigger a review.Pre-merge checks
This PR introduces handling for
pull_request.review_requestedwebhooks targeting the bot, ensuring semantic reviews are dispatched for open, non-draft PRs. It also changes the environment variable for the Forgejo token toAR_FORGEJO_TOKEN. The changes appear well-implemented with appropriate tests, but documentation updates should be clear to prevent user confusion.Walkthrough
AR_FORGEJO_TOKENinstead ofFORGEJO_TOKEN. This change is crucial for users setting up their environment.forgejo_api_token_from_env_valuesto read the Forgejo token fromAR_FORGEJO_TOKEN.is_actionableto handleReviewRequestedactions specifically for the bot, ensuring the PR is open and the reviewer is the bot.AR_FORGEJO_TOKENto start.Pre-merge checks
This PR enhances the
ar-gatewayto handlepull_request.review_requestedwebhooks for bot logins, ensuring semantic reviews are dispatched for open, non-draft PRs. The changes include updates to the webhook handling logic, additional test cases, and documentation updates. The modifications appear well-tested and safe to merge.Walkthrough
review_requestedwebhooks for bot logins.stateandrequested_reviewerfields toPullRequestandPullRequestEventstructs to support the new webhook handling logic.is_actionablefunction to include logic for handlingreview_requestedactions for bot logins. Added test cases to ensure correct behavior.review_requestedwebhooks, ensuring that only valid requests trigger a review.review_requestedwebhooks and the environment variableAR_FORGEJO_TOKEN. This ensures users are aware of the new functionality and configuration requirements.Pre-merge checks