ci: Updates github action jira sync

This commit is contained in:
Euripedes Rocha
2026-03-30 10:16:46 +02:00
committed by Alex Lisitsyn
parent 16cde34582
commit e43f89546d
4 changed files with 46 additions and 77 deletions
-24
View File
@@ -1,24 +0,0 @@
name: Sync issue comments to JIRA
# This workflow will be triggered when new issue comment is created (including PR comments)
on: issue_comment
jobs:
sync_issue_comments_to_jira:
name: Sync Issue Comments to Jira
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: write
steps:
- uses: actions/checkout@main
- name: Sync issue comments to JIRA
uses: espressif/github-actions/sync_issues_to_jira@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_PASS: ${{ secrets.JIRA_PASS }}
JIRA_PROJECT: EPROT
JIRA_COMPONENT: modbus
JIRA_URL: ${{ secrets.JIRA_URL }}
JIRA_USER: ${{ secrets.JIRA_USER }}
-24
View File
@@ -1,24 +0,0 @@
name: Sync issues to Jira
# This workflow will be triggered when a new issue is opened
on: issues
jobs:
sync_issues_to_jira:
name: Sync issues to Jira
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: write
steps:
- uses: actions/checkout@main
- name: Sync GitHub issues to Jira project
uses: espressif/github-actions/sync_issues_to_jira@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_PASS: ${{ secrets.JIRA_PASS }}
JIRA_PROJECT: EPROT
JIRA_COMPONENT: modbus
JIRA_URL: ${{ secrets.JIRA_URL }}
JIRA_USER: ${{ secrets.JIRA_USER }}
-29
View File
@@ -1,29 +0,0 @@
name: Sync remain PRs to Jira
# This workflow will be triggered every hour, to sync remaining PRs (i.e. PRs with zero comment) to Jira project
# Note that, PRs can also get synced when new PR comment is created
on:
schedule:
- cron: "0 * * * *"
jobs:
sync_prs_to_jira:
name: Sync PRs to Jira
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: write
steps:
- uses: actions/checkout@main
- name: Sync PRs to Jira project
uses: espressif/github-actions/sync_issues_to_jira@master
with:
cron_job: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_PASS: ${{ secrets.JIRA_PASS }}
JIRA_PROJECT: EPROT
JIRA_COMPONENT: modbus
JIRA_URL: ${{ secrets.JIRA_URL }}
JIRA_USER: ${{ secrets.JIRA_USER }}
+46
View File
@@ -0,0 +1,46 @@
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:
- name: Check out
uses: actions/checkout@v6
- name: Run synchronization 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: EPROT
JIRA_COMPONENT: modbus
JIRA_URL: ${{ secrets.JIRA_URL }}
JIRA_USER: ${{ secrets.JIRA_USER }}