Skip to content

perf(core): optimize database indexing, lean projections, edge caching, and worker pipeline #123

perf(core): optimize database indexing, lean projections, edge caching, and worker pipeline

perf(core): optimize database indexing, lean projections, edge caching, and worker pipeline #123

name: pr_review_notice

Check warning on line 1 in .github/workflows/pr_review_notice.yml

View workflow run for this annotation

GitHub Actions / pr_review_notice

Workflow execution policy warning (evaluate mode)

On November 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
on:
pull_request_target:
types: [opened, reopened]
permissions:
contents: read
issues: write
pull-requests: write
jobs:
comment_review_notice:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
# Use the built-in token so the comment is authored by github-actions[bot]
github-token: ${{ github.token }}
script: |
const { owner, repo } = context.repo;
const pr = context.payload.pull_request;
const pr_number = pr.number;
const pr_author = pr.user.login;
const maintainers = ["o2sa"].map(u => u.toLowerCase());
if (maintainers.includes(pr_author.toLowerCase())) return;
const body =
"Thank you for the pull request! ✅\n\n" +
"A maintainer will review this soon. Please be patient while we take a look. 🙌";
// Avoid duplicate comment spam
const { data: comments } = await github.rest.issues.listComments({
owner,
repo,
issue_number: pr_number,
per_page: 100,
});
const already = comments.some(c =>
(c.body || "").includes("Thank you for the pull request! ✅")
);
if (already) return;
// Create comment
await github.rest.issues.createComment({
owner,
repo,
issue_number: pr_number,
body,
});
// React to the PR with 👀
try {
await github.rest.reactions.createForIssue({
owner,
repo,
issue_number: pr_number,
content: "eyes",
});
} catch (e) {
// Don't fail the workflow if reactions aren't permitted
core.info(`Could not add reaction: ${e.message}`);
}