Skip to content

Commit b70b4d5

Browse files
committed
ci: Update workflows for Jira sync and DangerJS
1 parent dc48a13 commit b70b4d5

File tree

6 files changed

+52
-76
lines changed

6 files changed

+52
-76
lines changed

.github/workflows/dangerjs.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,7 @@ jobs:
1212
pull-request-style-linter:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: Check out PR head
16-
uses: actions/checkout@v4
17-
with:
18-
ref: ${{ github.event.pull_request.head.sha }}
19-
2015
- name: DangerJS pull request linter
2116
uses: espressif/shared-github-dangerjs@v1
2217
env:
2318
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
with:
25-
instructions-contributions-file: CONTRIBUTING.rst
26-
instructions-gitlab-mirror: 'true'

.github/workflows/issue_comment.yml

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

.github/workflows/new_issues.yml

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

.github/workflows/new_prs.yml

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

.github/workflows/sync-jira.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 🔷 Sync to Jira
2+
3+
run-name: >
4+
Sync to Jira -
5+
${{ github.event_name == 'issue_comment' && 'Issue Comment' ||
6+
github.event_name == 'schedule' && 'New Pull Requests' ||
7+
github.event_name == 'issues' && format('Issue ({0})', github.event.action) ||
8+
github.event_name == 'workflow_dispatch' && 'Manual Sync' }}
9+
10+
on:
11+
# No `types` under `issues` — runs on every issues activity (opened, edited, closed, labeled, …).
12+
issues:
13+
issue_comment:
14+
types: [created, edited, deleted]
15+
schedule:
16+
- cron: 0 * * * *
17+
workflow_dispatch:
18+
inputs:
19+
action:
20+
description: Action to be performed
21+
required: true
22+
default: mirror-issues
23+
issue-numbers:
24+
description: Issue numbers to sync (comma-separated)
25+
required: true
26+
27+
jobs:
28+
sync-to-jira:
29+
name: >
30+
Sync to Jira -
31+
${{ github.event_name == 'issue_comment' && 'Issue Comment' ||
32+
github.event_name == 'schedule' && 'New Pull Requests' ||
33+
github.event_name == 'issues' && format('Issue ({0})', github.event.action) ||
34+
github.event_name == 'workflow_dispatch' && 'Manual Sync' }}
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: read
38+
issues: write
39+
pull-requests: write
40+
steps:
41+
- name: Run synchronization to Jira
42+
uses: espressif/sync-jira-actions@v1
43+
with:
44+
cron_job: ${{ github.event_name == 'schedule' && 'true' || '' }}
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
JIRA_PASS: ${{ secrets.JIRA_PASS }}
48+
JIRA_PROJECT: IDFGH
49+
JIRA_COMPONENT: tools
50+
JIRA_URL: ${{ secrets.JIRA_URL }}
51+
JIRA_USER: ${{ secrets.JIRA_USER }}

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ repos:
4747
rev: 1.19.1
4848
hooks:
4949
- id: yamlfix
50+
exclude: .github/workflows/.*\.yml$

0 commit comments

Comments
 (0)