[ci] Enabled issue autoassignment bots#359
Conversation
📝 WalkthroughWalkthroughThis pull request introduces four new GitHub Actions workflows in Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
All workflows follow standard OpenWISP patterns with appropriate permissions, concurrency controls, and event filtering. Reviewed by kimi-k2.5 · 91,220 tokens |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/bot-autoassign-pr-issue-link.yml:
- Line 14: The workflow's if condition "if: github.event.action != 'closed' ||
github.event.pull_request.merged == false" currently allows execution on
closed-but-not-merged PRs; if you want to avoid running on rejected/closed PRs
change the predicate to explicitly run only for open events (for example use
github.event.action == 'opened' || github.event.action == 'reopened') or use a
stricter guard combining both checks (e.g., require github.event.action !=
'closed' && github.event.pull_request.merged == false) depending on whether you
want to also exclude other non-open actions; update the if: expression
accordingly in the workflow to match the intended behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9d467fb2-584d-47dd-9a87-5285fce679c6
📒 Files selected for processing (4)
.github/workflows/bot-autoassign-issue.yml.github/workflows/bot-autoassign-pr-issue-link.yml.github/workflows/bot-autoassign-pr-reopen.yml.github/workflows/bot-autoassign-stale-pr.yml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Kilo Code Review
- GitHub Check: Analyze (python)
- GitHub Check: Analyze (actions)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-05-08T07:50:00.764Z
Learnt from: stktyagi
Repo: openwisp/django-rest-framework-gis PR: 358
File: .github/workflows/bot-ci-failure.yml:75-87
Timestamp: 2026-05-08T07:50:00.764Z
Learning: In this repository, the workflow `.github/workflows/bot-ci-failure.yml` intentionally references the reusable workflow `openwisp/openwisp-utils/.github/workflows/reusable-bot-ci-failure.yml` using `master` (not a pinned commit SHA) specifically to stay synced with the latest `openwisp/openwisp-utils` master. When reviewing, do not flag this `master` reference as a supply-chain risk issue for this workflow reference.
Applied to files:
.github/workflows/bot-autoassign-stale-pr.yml.github/workflows/bot-autoassign-issue.yml.github/workflows/bot-autoassign-pr-issue-link.yml.github/workflows/bot-autoassign-pr-reopen.yml
📚 Learning: 2026-05-08T07:59:37.660Z
Learnt from: stktyagi
Repo: openwisp/django-rest-framework-gis PR: 358
File: .github/workflows/bot-ci-failure.yml:60-60
Timestamp: 2026-05-08T07:59:37.660Z
Learning: In GitHub Actions workflow YAML files, when using the `gh` CLI with the `gh ... --jq` option, remember that `--jq` accepts only an inline jq filter expression string. It does not support jq CLI flags like `--arg`/`--args` or other jq CLI argument mechanisms. Therefore, do not recommend `gh --jq --arg sha "$VAR"`; instead, pass values by embedding shell variables directly into the `--jq` expression string (e.g., `--jq "... $VAR ..."`), ensuring proper quoting/escaping so the resulting jq filter is syntactically correct.
Applied to files:
.github/workflows/bot-autoassign-stale-pr.yml.github/workflows/bot-autoassign-issue.yml.github/workflows/bot-autoassign-pr-issue-link.yml.github/workflows/bot-autoassign-pr-reopen.yml
🔇 Additional comments (4)
.github/workflows/bot-autoassign-issue.yml (1)
1-20: LGTM!.github/workflows/bot-autoassign-pr-issue-link.yml (1)
1-21: LGTM!.github/workflows/bot-autoassign-pr-reopen.yml (1)
1-31: LGTM!.github/workflows/bot-autoassign-stale-pr.yml (1)
1-21: LGTM!
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds GitHub Actions workflows that invoke OpenWISP’s reusable bot workflow to automate issue assignment and PR lifecycle management (reopen reassignment, PR↔issue linking, and stale PR handling).
Changes:
- Added scheduled workflow to manage stale PRs via the shared bot implementation.
- Added workflows to (re)assign on PR reopen and react to PR author activity via comments.
- Added workflows to auto-assign issues based on PR↔issue linkage and issue comment requests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/bot-autoassign-stale-pr.yml | Scheduled workflow calling reusable bot to manage stale PRs. |
| .github/workflows/bot-autoassign-pr-reopen.yml | Triggers reassignment on PR reopen and certain PR comment activity. |
| .github/workflows/bot-autoassign-pr-issue-link.yml | Runs issue auto-assignment logic on PR open/reopen/close events. |
| .github/workflows/bot-autoassign-issue.yml | Runs issue comment-driven assignment bot for non-PR issues. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| respond-to-assign-request: | ||
| if: github.event.issue.pull_request == null | ||
| uses: openwisp/openwisp-utils/.github/workflows/reusable-bot-autoassign.yml@master | ||
| with: | ||
| bot_command: issue_assignment | ||
| secrets: | ||
| OPENWISP_BOT_APP_ID: ${{ secrets.OPENWISP_BOT_APP_ID }} | ||
| OPENWISP_BOT_PRIVATE_KEY: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} |
| on: | ||
| pull_request_target: | ||
| types: [reopened] | ||
| issue_comment: | ||
| types: [created] | ||
| permissions: | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write |
| reassign-on-reopen: | ||
| if: github.event_name == 'pull_request_target' && github.event.action == 'reopened' | ||
| uses: openwisp/openwisp-utils/.github/workflows/reusable-bot-autoassign.yml@master | ||
| with: | ||
| bot_command: pr_reopen | ||
| secrets: | ||
| OPENWISP_BOT_APP_ID: ${{ secrets.OPENWISP_BOT_APP_ID }} | ||
| OPENWISP_BOT_PRIVATE_KEY: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} |
| pull_request_target: | ||
| types: [opened, reopened, closed] |
| if: github.event.action != 'closed' || github.event.pull_request.merged == false | ||
| uses: openwisp/openwisp-utils/.github/workflows/reusable-bot-autoassign.yml@master | ||
| with: | ||
| bot_command: issue_assignment | ||
| secrets: | ||
| OPENWISP_BOT_APP_ID: ${{ secrets.OPENWISP_BOT_APP_ID }} | ||
| OPENWISP_BOT_PRIVATE_KEY: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} |
Checklist
This PR adds the GitHub Actions workflows to auto-assign issues, manage PR-issue linking, handle PR reopening reassignment, and manage stale PRs.
These workflows check out
openwisp/openwisp-utilsto run the bot Python scripts, ensuring uniform behavior across all repositories.Related to the auto-assignment issue bot implementation.