Skip to content

[ci] Enabled issue autoassignment bots#359

Merged
nemesifier merged 1 commit into
masterfrom
ci/bot-autoassign
May 13, 2026
Merged

[ci] Enabled issue autoassignment bots#359
nemesifier merged 1 commit into
masterfrom
ci/bot-autoassign

Conversation

@Eeshu-Yadav
Copy link
Copy Markdown
Contributor

@Eeshu-Yadav Eeshu-Yadav commented May 13, 2026

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

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-utils to run the bot Python scripts, ensuring uniform behavior across all repositories.
Related to the auto-assignment issue bot implementation.

Copilot AI review requested due to automatic review settings May 13, 2026 19:31
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This pull request introduces four new GitHub Actions workflows in .github/workflows/ to automate issue and pull request management. Each workflow triggers on distinct events (issue comments, PR lifecycle, scheduled cron) and delegates to a shared reusable workflow (openwisp/openwisp-utils) with different bot commands: issue_assignment, pr_reopen, and stale_pr. All workflows include proper permission scoping, concurrency controls to prevent overlapping runs, and pass bot credentials via repository secrets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

github_actions

Suggested reviewers

  • nemesifier
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title '[ci] Enabled issue autoassignment bots' clearly and accurately summarizes the main change—adding GitHub Actions workflows for automated issue assignment bots.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Bug Fixes ✅ Passed PR adds GitHub Actions workflows for bot automation, not fixing core bugs. Falls under valid exception for GitHub Actions workflow changes.
Description check ✅ Passed The PR description follows the template structure with a completed checklist and provides a clear description of the changes (adding four GitHub Actions workflows for automation).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/bot-autoassign

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added the github_actions Pull requests that update GitHub Actions code label May 13, 2026
@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot Bot commented May 13, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • .github/workflows/bot-autoassign-issue.yml - Handles issue assignment via comments
  • .github/workflows/bot-autoassign-pr-issue-link.yml - Links PRs to issues and handles assignment
  • .github/workflows/bot-autoassign-pr-reopen.yml - Reassigns issues when PRs are reopened
  • .github/workflows/bot-autoassign-stale-pr.yml - Manages stale PRs via scheduled runs

All workflows follow standard OpenWISP patterns with appropriate permissions, concurrency controls, and event filtering.


Reviewed by kimi-k2.5 · 91,220 tokens

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d4c5578 and 28d3f00.

📒 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!

Comment thread .github/workflows/bot-autoassign-pr-issue-link.yml
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +12 to +19
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 }}
Comment on lines +2 to +10
on:
pull_request_target:
types: [reopened]
issue_comment:
types: [created]
permissions:
contents: read
issues: write
pull-requests: write
Comment on lines +15 to +22
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 }}
Comment on lines +3 to +4
pull_request_target:
types: [opened, reopened, closed]
Comment on lines +14 to +20
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 }}
@nemesifier nemesifier merged commit 56605b4 into master May 13, 2026
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants