Skip to content

Commit ae6c319

Browse files
authored
Merge pull request #5 from espressif/ci/update-sync-jira-action
ci: update sync-jira GH action
2 parents f18e577 + a8efecf commit ae6c319

File tree

4 files changed

+60
-65
lines changed

4 files changed

+60
-65
lines changed

.github/workflows/issue_comment.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/new_issues.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/new_prs.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/sync-jira.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
# This GitHub Actions workflow synchronizes GitHub issues, comments, and pull requests with Jira.
3+
# It triggers on new issues, issue comments, and on a scheduled basis.
4+
# The workflow uses a custom action to perform the synchronization with Jira (espressif/sync-jira-actions).
5+
6+
name: 🔷 Sync to Jira
7+
8+
run-name: >
9+
Sync to Jira -
10+
${{ github.event_name == 'issue_comment' && 'Issue Comment' ||
11+
github.event_name == 'schedule' && 'New Pull Requests' ||
12+
github.event_name == 'issues' && 'New Issue' ||
13+
github.event_name == 'workflow_dispatch' && 'Manual Sync' }}
14+
15+
on:
16+
issues: { types: [opened] }
17+
issue_comment: { types: [created, edited, deleted] }
18+
schedule: [cron: "0 * * * *"]
19+
workflow_dispatch:
20+
inputs:
21+
action:
22+
{
23+
description: "Action to be performed",
24+
required: true,
25+
default: "mirror-issues",
26+
}
27+
issue-numbers:
28+
{
29+
description: "Issue numbers to sync (comma-separated)",
30+
required: true,
31+
}
32+
33+
jobs:
34+
sync-to-jira:
35+
name: >
36+
Sync to Jira -
37+
${{ github.event_name == 'issue_comment' && 'Issue Comment' ||
38+
github.event_name == 'schedule' && 'New Pull Requests' ||
39+
github.event_name == 'issues' && 'New Issue' ||
40+
github.event_name == 'workflow_dispatch' && 'Manual Sync' }}
41+
runs-on: ubuntu-latest
42+
permissions:
43+
contents: read
44+
issues: write
45+
pull-requests: write
46+
steps:
47+
- name: Check out
48+
uses: actions/checkout@v4
49+
50+
- name: Run synchronization to Jira
51+
uses: espressif/sync-jira-actions@v1
52+
with:
53+
cron_job: ${{ github.event_name == 'schedule' && 'true' || '' }}
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
JIRA_PASS: ${{ secrets.JIRA_PASS }}
57+
JIRA_PROJECT: RDT
58+
JIRA_COMPONENT: idf-build-apps
59+
JIRA_URL: ${{ secrets.JIRA_URL }}
60+
JIRA_USER: ${{ secrets.JIRA_USER }}

0 commit comments

Comments
 (0)