Skip to content

[change] Make menu item registration idempotent #641 #179

[change] Make menu item registration idempotent #641

[change] Make menu item registration idempotent #641 #179

name: PR Issue Auto-Assignment
on:
pull_request_target:
types: [opened, reopened, closed]
permissions:
contents: read
issues: write
pull-requests: read
concurrency:
group: bot-autoassign-pr-link-${{ github.repository }}-${{ github.event.pull_request.number }}-${{ github.event.action }}
cancel-in-progress: true
jobs:
auto-assign-issue:
if: >
github.repository == 'openwisp/openwisp-utils' &&
(github.event.action != 'closed' || github.event.pull_request.merged == false)
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: generate-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.OPENWISP_BOT_APP_ID }}
private-key: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install dependencies
run: pip install -e .[github_actions]
- name: Run issue assignment bot
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
REPOSITORY: ${{ github.repository }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
BOT_USERNAME: openwisp-companion
run: >
python .github/actions/bot-autoassign/__main__.py
issue_assignment "$GITHUB_EVENT_PATH"