Skip to content

Commit

Permalink
Merge pull request #70 from espressif/jira-sync
Browse files Browse the repository at this point in the history
Add sync-jira workflow
  • Loading branch information
kolipakakondal authored Jan 31, 2025
2 parents 829822b + 1102422 commit 232c6f4
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/sync-jira.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
# FILE: .github/workflows/sync-jira.yml

# This GitHub Actions workflow synchronizes GitHub issues, comments, and pull requests with Jira.
# It triggers on new issues, issue comments, and on a scheduled basis.
# The workflow uses a custom action to perform the synchronization with Jira (espressif/sync-jira-actions).

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@v4

- 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: EIM # <---- update for your Jira project
JIRA_COMPONENT: GitHub
JIRA_URL: ${{ secrets.JIRA_URL }}
JIRA_USER: ${{ secrets.JIRA_USER }}

0 comments on commit 232c6f4

Please sign in to comment.