00b2b7500e
Replace three separate Jira sync workflows (new_issues.yml, issue_comment.yml, new_prs.yml) with a single sync-jira.yml following the recommended pattern from espressif/sync-jira-actions. Changes: - Migrate from espressif/github-actions/sync_issues_to_jira@master to espressif/sync-jira-actions@v1 - Add missing GITHUB_TOKEN permissions (contents:read, issues:write, pull-requests:write) - Add workflow_dispatch trigger for manual syncing - Add dynamic run-name for better visibility in Actions UI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: Sync to Jira
|
|
|
|
run-name: >
|
|
Sync to Jira -
|
|
${{ github.event_name == 'issue_comment' && 'Issue Comment' ||
|
|
github.event_name == 'schedule' && 'New Pull Requests' ||
|
|
github.event_name == 'issues' && 'New Issue' ||
|
|
github.event_name == 'workflow_dispatch' && 'Manual Sync' }}
|
|
|
|
on:
|
|
issues: {types: [opened]}
|
|
issue_comment: {types: [created, edited, deleted]}
|
|
schedule: [cron: '0 * * * *']
|
|
workflow_dispatch:
|
|
inputs:
|
|
action: {description: 'Action to be performed', required: true, default: 'mirror-issues'}
|
|
issue-numbers: {description: 'Issue numbers to sync (comma-separated)', required: true}
|
|
|
|
jobs:
|
|
sync-to-jira:
|
|
name: >
|
|
Sync to Jira -
|
|
${{ github.event_name == 'issue_comment' && 'Issue Comment' ||
|
|
github.event_name == 'schedule' && 'New Pull Requests' ||
|
|
github.event_name == 'issues' && 'New Issue' ||
|
|
github.event_name == 'workflow_dispatch' && 'Manual Sync' }}
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Sync to Jira
|
|
uses: espressif/sync-jira-actions@v1
|
|
with:
|
|
cron_job: ${{ github.event_name == 'schedule' && 'true' || '' }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
JIRA_PASS: ${{ secrets.JIRA_PASS }}
|
|
JIRA_PROJECT: QEMU
|
|
JIRA_COMPONENT: GitHub
|
|
JIRA_URL: ${{ secrets.JIRA_URL }}
|
|
JIRA_USER: ${{ secrets.JIRA_USER }}
|