From cb1f4be6b571040918866ed6c02acd781f7854f1 Mon Sep 17 00:00:00 2001 From: Tomas Sebestik Date: Mon, 2 Sep 2024 11:24:14 +0200 Subject: [PATCH 1/2] feat(reusable-workflow): add reusable workflows pre-commit and dangerjs-github --- .../workflows/reusable-dangerjs-github.yml | 132 ++++++++++++++++++ .github/workflows/reusable-pre-commit.yml | 34 +++++ .github/workflows/workflows-instructions.md | 75 ++++++++++ 3 files changed, 241 insertions(+) create mode 100644 .github/workflows/reusable-dangerjs-github.yml create mode 100644 .github/workflows/reusable-pre-commit.yml create mode 100644 .github/workflows/workflows-instructions.md diff --git a/.github/workflows/reusable-dangerjs-github.yml b/.github/workflows/reusable-dangerjs-github.yml new file mode 100644 index 0000000..f2a7ad0 --- /dev/null +++ b/.github/workflows/reusable-dangerjs-github.yml @@ -0,0 +1,132 @@ +--- +# Reusable workflow in "espressif/.github" repository (Organization level) +name: DangerJS (PR style linter) + +on: + workflow_call: + inputs: + ref: + description: 'The pull request head reference' + required: true + type: string + rule-description: + description: 'Enable rule for PR Description' + required: false + type: string + default: 'true' + rule-commit-messages: + description: 'Enable rule for PR Lint Commit Messages' + required: false + type: string + default: 'true' + rule-size-lines: + description: 'Enable rule for PR Size (changed lines)' + required: false + type: string + default: 'true' + rule-source-branch: + description: 'Enable rule for PR Source branch name' + required: false + type: string + default: 'true' + rule-target-branch: + description: 'Enable rule for PR Target branch name' + required: false + type: string + default: 'true' + rule-max-commits: + description: 'Enable rule for PR Too Many Commits' + required: false + type: string + default: 'true' + commit-messages-types: + description: 'Allowed commit message "Type"s' + required: false + type: string + default: 'change,ci,docs,feat,fix,refactor,remove,revert,test' + commit-messages-max-body-line-length: + description: 'Max length for commit message "Body" line' + required: false + type: string + default: '100' + commit-messages-max-summary-length: + description: 'Max length for commit message "Summary"' + required: false + type: string + default: '72' + commit-messages-min-summary-length: + description: 'Min length for commit message "Summary"' + required: false + type: string + default: '20' + description-ignore-sections: + description: 'Sections of PR description to ignore when counting length' + required: false + type: string + default: 'related,release,breaking' + max-size-lines: + description: 'Max changed code lines in PR' + required: false + type: string + default: '1000' + max-commits-info: + description: 'Soft limit for maximum commits in PR' + required: false + type: string + default: '2' + max-commits-warn: + description: 'Hard limit for maximum commits in PR' + required: false + type: string + default: '5' + instructions-contributions-file: + description: 'Path to CONTRIBUTING.md or other instructions file' + required: false + type: string + default: '' + instructions-gitlab-mirror: + description: 'Enable GitLab mirror instructions' + required: false + type: string + default: 'false' + instructions-cla-link: + description: 'Link to CLA (Contributor License Agreement)' + required: false + type: string + default: '' + +permissions: + pull-requests: write + contents: write + +jobs: + pull-request-style-linter: + runs-on: ubuntu-latest + steps: + - name: Check out PR head + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} + + - name: DangerJS pull request linter + uses: espressif/shared-github-dangerjs@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + rule-description: ${{ inputs.rule-description }} + rule-commit-messages: ${{ inputs.rule-commit-messages }} + rule-size-lines: ${{ inputs.rule-size-lines }} + rule-source-branch: ${{ inputs.rule-source-branch }} + rule-target-branch: ${{ inputs.rule-target-branch }} + rule-max-commits: ${{ inputs.rule-max-commits }} + commit-messages-types: ${{ inputs.commit-messages-types }} + commit-messages-max-body-line-length: ${{ inputs.commit-messages-max-body-line-length }} + commit-messages-max-summary-length: ${{ inputs.commit-messages-max-summary-length }} + commit-messages-min-summary-length: ${{ inputs.commit-messages-min-summary-length }} + description-ignore-sections: ${{ inputs.description-ignore-sections }} + max-size-lines: ${{ inputs.max-size-lines }} + max-commits-info: ${{ inputs.max-commits-info }} + max-commits-warn: ${{ inputs.max-commits-warn }} + instructions-contributions-file: ${{ inputs.instructions-contributions-file }} + instructions-gitlab-mirror: ${{ inputs.instructions-gitlab-mirror }} + instructions-cla-link: ${{ inputs.instructions-cla-link }} diff --git a/.github/workflows/reusable-pre-commit.yml b/.github/workflows/reusable-pre-commit.yml new file mode 100644 index 0000000..70595ad --- /dev/null +++ b/.github/workflows/reusable-pre-commit.yml @@ -0,0 +1,34 @@ +--- +# Reusable workflow in "espressif/.github" repository (Organization level) +name: Pre-commit (PR code changes) + +on: + workflow_call: + inputs: + python-version: + description: 'The Python version to use in CI' + required: false + type: string + default: '3.9' + skip: + description: "The pre-commit hooks to skip in CI" + required: false + type: string + default: 'pip-compile' + +jobs: + check-pre-commit: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python-version }} + + - name: Run pre-commit + uses: pre-commit/action@v3.0.1 + env: + SKIP: ${{ inputs.skip }} diff --git a/.github/workflows/workflows-instructions.md b/.github/workflows/workflows-instructions.md new file mode 100644 index 0000000..aa51e3e --- /dev/null +++ b/.github/workflows/workflows-instructions.md @@ -0,0 +1,75 @@ +These are [GitHub reusable workflows](https://docs.github.com/en/actions/sharing-automations/reusing-workflows) that can be called from any repository within the Espressif GitHub organization. + +ℹ️ Their **presence here does not mean they are automatically propagated or inherited across all Espressif organization GitHub repositories** (as with issue and pull request templates). These workflows **need to be explicitly called**. See the ["Calling from the target repository"](#calling-from-the-target-repository) section for details. + +--- + +- [Reasoning](#reasoning) +- [Calling from the target repository](#calling-from-the-target-repository) +- [Custom Parameters and Configuration](#custom-parameters-and-configuration) +- [Troubleshooting](#troubleshooting) + +## Reasoning + +Managing these workflows from a central place like this repository (`espressif/.github`) offers several advantages: + +- **Ease of Integration**: Simplifies the process for repository administrators—only a call statement is needed to integrate the workflow. +- **Centralized Updates**: Quickly update the version of a GitHub workflow for all repositories that use it with a single change here. +- **Consistent Permissions**: Ensure that action permissions are set correctly across all repositories. + +## Calling from the target repository + +In the target repository, e.g., `espressif/example-repo`, the following steps are required: + +1. Create a file at the usual location for GitHub Actions workflow YAML files, such as `.github/workflows/call-pre-commit.yml`. +2. Add the following content to that file: + +```yaml +# REPO: https://github.com/espressif/example-repo +# FILE: .github/workflows/call-pre-commit.yml +--- +name: Pre-commit (PR code changes) + +on: + pull_request: + +jobs: + call-pre-commit: + uses: espressif/.github/.github/workflows/reusable-pre-commit.yml@main +``` + +This will enable the reusable GitHub workflow in the target repository (`espressif/example-repo`). + +If the configuration ever changes in the `espressif/.github` repository (this repo), there is no need to make changes in every repository — it is propagated automatically. For example, if an external action version is updated (e.g., `uses: actions/setup-python@v4` to `uses: actions/setup-python@v5`), it would automatically apply to all repositories using this workflow. + +## Custom Parameters and Configuration + +The reusable workflow can be called with custom parameters, such as: + +```yaml +# REPO: https://github.com/espressif/example-repo +# FILE: .github/workflows/call-pre-commit.yml +--- +name: Pre-commit checks + +on: + pull_request: + +jobs: + call-pre-commit: + uses: espressif/.github/.github/workflows/reusable-pre-commit.yml@main + with: + python-version: '3.12' # Optionally override the Python version + skip: 'codespell,mdformat' # Optionally skip specific pre-commit hooks in CI +``` + +This allows precise customization of the local action configuration without needing to delve into the full action YAML file. + +## Troubleshooting + +If the reusable workflow is not running in the target repository, check the following: + +- **Actions and Workflow Permissions**: Ensure that the target repository allows `Allow all actions and reusable workflows` (in repo `Settings -> Actions -> Actions permissions`). +- **Correct Path to Reusable Workflow**: Double-check the path in the `uses:` directive. The correct format is `espressif/.github/.github/workflows/.yml@main` (note the two `.github` segments in the path; the first refers to the .github repository, and the second refers to the .github directory within that repository). + +--- From ec43d8fb5716d1698b57beb85f774d755d49bb54 Mon Sep 17 00:00:00 2001 From: Tomas Sebestik Date: Wed, 4 Sep 2024 17:26:32 +0200 Subject: [PATCH 2/2] feat(reusable-workflows): add reusable workflows JIRA --- .github/.pre-commit-config.yaml | 52 +++++++ ...gerjs-github.yml => reusable-dangerjs.yml} | 6 +- .github/workflows/reusable-pre-commit.yml | 4 +- .../reusable-sync-jira-issue-comments.yml | 33 ++++ .../workflows/reusable-sync-jira-issues.yml | 33 ++++ .github/workflows/reusable-sync-jira-prs.yml | 41 +++++ .../workflows/templates/call-pre-commit.yml | 16 ++ .github/workflows/workflows-instructions.md | 146 +++++++++++++++--- 8 files changed, 306 insertions(+), 25 deletions(-) create mode 100644 .github/.pre-commit-config.yaml rename .github/workflows/{reusable-dangerjs-github.yml => reusable-dangerjs.yml} (97%) create mode 100644 .github/workflows/reusable-sync-jira-issue-comments.yml create mode 100644 .github/workflows/reusable-sync-jira-issues.yml create mode 100644 .github/workflows/reusable-sync-jira-prs.yml create mode 100644 .github/workflows/templates/call-pre-commit.yml diff --git a/.github/.pre-commit-config.yaml b/.github/.pre-commit-config.yaml new file mode 100644 index 0000000..668d5fd --- /dev/null +++ b/.github/.pre-commit-config.yaml @@ -0,0 +1,52 @@ +--- +# install with: 'pre-commit install --config=.github/.pre-commit-config.yaml' + +minimum_pre_commit_version: 3.3.0 +default_install_hook_types: [pre-commit, commit-msg] +default_stages: [commit] + +repos: + - repo: meta + hooks: + - id: check-hooks-apply + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable + - id: check-case-conflict + - id: mixed-line-ending + args: ['-f=lf'] + + - repo: https://github.com/espressif/conventional-precommit-linter + rev: v1.10.0 + hooks: + - id: conventional-precommit-linter + + - repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + args: ['--write-changes'] + additional_dependencies: [tomli] + + - repo: https://github.com/executablebooks/mdformat + rev: 0.7.17 + hooks: + - id: mdformat + args: [--number] + additional_dependencies: + - mdformat-gfm + - mdformat-ruff + - mdformat-simple-breaks + + - repo: https://github.com/Yelp/detect-secrets + rev: v1.5.0 + hooks: + - id: detect-secrets + args: + - --base64-limit=4 + - --hex-limit=3 diff --git a/.github/workflows/reusable-dangerjs-github.yml b/.github/workflows/reusable-dangerjs.yml similarity index 97% rename from .github/workflows/reusable-dangerjs-github.yml rename to .github/workflows/reusable-dangerjs.yml index f2a7ad0..953578f 100644 --- a/.github/workflows/reusable-dangerjs-github.yml +++ b/.github/workflows/reusable-dangerjs.yml @@ -100,15 +100,15 @@ permissions: contents: write jobs: - pull-request-style-linter: + dangerjs: runs-on: ubuntu-latest steps: - - name: Check out PR head + - name: Check out Pull Request head uses: actions/checkout@v4 with: ref: ${{ inputs.ref }} - - name: DangerJS pull request linter + - name: DangerJS (PR style linter) uses: espressif/shared-github-dangerjs@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/reusable-pre-commit.yml b/.github/workflows/reusable-pre-commit.yml index 70595ad..8f2a56b 100644 --- a/.github/workflows/reusable-pre-commit.yml +++ b/.github/workflows/reusable-pre-commit.yml @@ -17,7 +17,7 @@ on: default: 'pip-compile' jobs: - check-pre-commit: + pre-commit: runs-on: ubuntu-latest steps: - name: Checkout code @@ -31,4 +31,4 @@ jobs: - name: Run pre-commit uses: pre-commit/action@v3.0.1 env: - SKIP: ${{ inputs.skip }} + SKIP: ${{ inputs.skip }} diff --git a/.github/workflows/reusable-sync-jira-issue-comments.yml b/.github/workflows/reusable-sync-jira-issue-comments.yml new file mode 100644 index 0000000..29bbf62 --- /dev/null +++ b/.github/workflows/reusable-sync-jira-issue-comments.yml @@ -0,0 +1,33 @@ +--- +# Reusable workflow in "espressif/.github" repository (Organization level) +name: Sync JIRA - Issue Comments + +on: + workflow_call: + inputs: + jira-project: + description: 'Jira project name' + required: true + type: string + + jira-component: + description: 'Jira component name' + required: false + type: string + default: 'GitHub' + +jobs: + sync_issue_comments_to_jira: + name: Sync Issue Comments to Jira + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Sync issue comments to JIRA + uses: espressif/sync-jira-actions@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JIRA_PASS: ${{ secrets.JIRA_PASS }} + JIRA_PROJECT: ${{ inputs.jira-project }} + JIRA_COMPONENT: ${{ inputs.jira-component }} + JIRA_URL: ${{ secrets.JIRA_URL }} + JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/reusable-sync-jira-issues.yml b/.github/workflows/reusable-sync-jira-issues.yml new file mode 100644 index 0000000..2a33208 --- /dev/null +++ b/.github/workflows/reusable-sync-jira-issues.yml @@ -0,0 +1,33 @@ +--- +# Reusable workflow in "espressif/.github" repository (Organization level) +name: Sync JIRA - Issues + +on: + workflow_call: + inputs: + jira-project: + description: 'Jira project name' + required: true + type: string + + jira-component: + description: 'Jira component name' + required: false + type: string + default: 'GitHub' + +jobs: + sync-jira-issues: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Sync JIRA - Issues + uses: espressif/sync-jira-actions@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JIRA_PASS: ${{ secrets.JIRA_PASS }} + JIRA_PROJECT: ${{ inputs.jira-project }} + JIRA_COMPONENT: ${{ inputs.jira-component }} + JIRA_URL: ${{ secrets.JIRA_URL }} + JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/reusable-sync-jira-prs.yml b/.github/workflows/reusable-sync-jira-prs.yml new file mode 100644 index 0000000..51d980f --- /dev/null +++ b/.github/workflows/reusable-sync-jira-prs.yml @@ -0,0 +1,41 @@ +--- +# Reusable workflow in "espressif/.github" repository (Organization level) +name: Sync JIRA - Pull Requests + +on: + workflow_call: + inputs: + cron-job: + description: 'Run as scheduled job' + required: false + type: boolean + default: true + + jira-project: + description: 'Jira project name' + required: true + type: string + + jira-component: + description: 'Jira component name' + required: false + type: string + default: 'GitHub' + +jobs: + sync-jira-pull-requests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: JIRA Sync - Pull Requests + uses: espressif/sync-jira-actions@v1 + with: + cron_job: ${{ inputs.cron-job }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JIRA_PASS: ${{ secrets.JIRA_PASS }} + JIRA_PROJECT: ${{ inputs.jira-project }} + JIRA_COMPONENT: ${{ inputs.jira-component }} + JIRA_URL: ${{ secrets.JIRA_URL }} + JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/templates/call-pre-commit.yml b/.github/workflows/templates/call-pre-commit.yml new file mode 100644 index 0000000..e209c00 --- /dev/null +++ b/.github/workflows/templates/call-pre-commit.yml @@ -0,0 +1,16 @@ +# Copy this file form here to your TARGET PROJECT (e.g. https://github.com/esptool/.github/workflows/call-pre-commit.yml) + +# If you have another versions of pre-commit hooks Github Action workflow already in your repo, +# (e.g. https://github.com/esptool/.github/workflows/pre-commit.yml) you should remove them +# with adding this file to your repo to avoid conflicts and double execution of the same tasks. + +# Keep it slim after adding to your repo and remove all absolutely unnecessary comments. +--- +name: Pre-commit (PR code changes) + +on: + pull_request: + +jobs: + call-pre-commit: + uses: espressif/.github/.github/workflows/reusable-pre-commit.yml@main diff --git a/.github/workflows/workflows-instructions.md b/.github/workflows/workflows-instructions.md index aa51e3e..2b99e7e 100644 --- a/.github/workflows/workflows-instructions.md +++ b/.github/workflows/workflows-instructions.md @@ -1,12 +1,21 @@ These are [GitHub reusable workflows](https://docs.github.com/en/actions/sharing-automations/reusing-workflows) that can be called from any repository within the Espressif GitHub organization. -ℹ️ Their **presence here does not mean they are automatically propagated or inherited across all Espressif organization GitHub repositories** (as with issue and pull request templates). These workflows **need to be explicitly called**. See the ["Calling from the target repository"](#calling-from-the-target-repository) section for details. +> \[!IMPORTANT\] +> Their presence here does not mean they are automatically propagated or inherited across all Espressif organization GitHub repositories +> (as with issue and pull request templates). +> These workflows need to be explicitly called. See the ["Calling from the target repository"](#calling-from-the-target-repository) section for details. --- - [Reasoning](#reasoning) - [Calling from the target repository](#calling-from-the-target-repository) -- [Custom Parameters and Configuration](#custom-parameters-and-configuration) +- [Usage in target project (calls)](#usage-in-target-project-calls) + - [Pre-commit (PR code changes)](#pre-commit-pr-code-changes) + - [DangerJS (PR style linter)](#dangerjs-pr-style-linter) + - [JIRA Sync Actions (package)](#jira-sync-actions-package) + - [Sync JIRA - Pull Requests (1/3)](#sync-jira---pull-requests-13) + - [Sync JIRA - Issues (2/3)](#sync-jira---issues-23) + - [Sync JIRA - Issue Comments (3/3)](#sync-jira---issue-comments-33) - [Troubleshooting](#troubleshooting) ## Reasoning @@ -22,10 +31,22 @@ Managing these workflows from a central place like this repository (`espressif/. In the target repository, e.g., `espressif/example-repo`, the following steps are required: 1. Create a file at the usual location for GitHub Actions workflow YAML files, such as `.github/workflows/call-pre-commit.yml`. -2. Add the following content to that file: +2. Add the call to the reusable workflow from another Espressif repository. +3. Optionally, you can add parameters that will be passed to the GitHub Action. + +This allows precise customization of the local action configuration without needing to modify the full action YAML file. + +> \[!NOTE\] +> If the configuration ever changes in the `espressif/.github` repository (this repo), there is no need to update every repository — the +> changes are propagated automatically. + +For example, if an external action version is updated (e.g., `uses: actions/setup-python@v4` to `uses: actions/setup-python@v5`), the update would automatically apply to all repositories using this workflow. + +## Usage in target project (calls) + +### Pre-commit (PR code changes) ```yaml -# REPO: https://github.com/espressif/example-repo # FILE: .github/workflows/call-pre-commit.yml --- name: Pre-commit (PR code changes) @@ -35,35 +56,122 @@ on: jobs: call-pre-commit: - uses: espressif/.github/.github/workflows/reusable-pre-commit.yml@main + uses: espressif/.github/.github/workflows/reusable-pre-commit.yml@main +``` + +**Optional arguments**: + +| input | description | type | default | +| -------------- | -------------------------------- | ------------- | ------------- | +| python-version | Python version the workflow uses | str | '3.9' | +| skip | pre-commit hooks skipped in CI | comma sep str | 'pip-compile' | + +### DangerJS (PR style linter) + +```yaml +# FILE: .github/workflows/call-dangerjs.yml +--- +name: DangerJS (PR style linter) + +on: + pull_request_target: + types: [opened, edited, reopened, synchronize] + +permissions: + pull-requests: write + contents: write + +jobs: + call-dangerjs: + uses: espressif/.github/.github/workflows/reusable-dangerjs.yml@master ``` -This will enable the reusable GitHub workflow in the target repository (`espressif/example-repo`). +**Optional arguments**: + +| with: | description | type | default | +| ---------------------- | --------------------------------------- | ---- | ------- | +| `rule-commit-messages` | Enable rule for PR Lint Commit Messages | str | 'true' | +| `rule-description` | Enable rule for PR Description | str | 'true' | +| `rule-max-commits` | Enable rule for PR Too Many Commits | str | 'true' | -If the configuration ever changes in the `espressif/.github` repository (this repo), there is no need to make changes in every repository — it is propagated automatically. For example, if an external action version is updated (e.g., `uses: actions/setup-python@v4` to `uses: actions/setup-python@v5`), it would automatically apply to all repositories using this workflow. +> \[!TIP\] +> The table with optional arguments is not exhaustive, it is here for reference. +> More information and config details in in project [espressif/shared-github-dangerjs](https://github.com/espressif/shared-github-dangerjs) -## Custom Parameters and Configuration +### JIRA Sync Actions (package) -The reusable workflow can be called with custom parameters, such as: +#### Sync JIRA - Pull Requests (1/3) ```yaml -# REPO: https://github.com/espressif/example-repo -# FILE: .github/workflows/call-pre-commit.yml +# FILE: .github/workflows/call-sync-jira-prs.yml --- -name: Pre-commit checks +name: Sync JIRA - Pull Requests on: - pull_request: + workflow_dispatch: # Allows manual triggering of the workflow + schedule: + - cron: '0 * * * *' # Adjust the cron schedule as needed + +concurrency: + group: jira-issues # Ensures only one workflow in the 'jira-issues' group runs at a time (avoid sync issues) jobs: - call-pre-commit: - uses: espressif/.github/.github/workflows/reusable-pre-commit.yml@main + call-sync-jira-pull-requests: + uses: espressif/.github/.github/workflows/reusable-sync-jira-prs.yml@main with: - python-version: '3.12' # Optionally override the Python version - skip: 'codespell,mdformat' # Optionally skip specific pre-commit hooks in CI + jira-project: '' # e.g., 'ESPTOOL' or 'IDFGH' ``` -This allows precise customization of the local action configuration without needing to delve into the full action YAML file. +#### Sync JIRA - Issues (2/3) + +```yaml +# FILE: .github/workflows/call-sync-jira-prs.yml +--- +name: Sync JIRA - Issues + +on: issues + +concurrency: + group: jira-issues # Ensures only one workflow in the 'jira-issues' group runs at a time (avoid sync issues) + +jobs: + call-sync-jira-pull-requests: + uses: espressif/.github/.github/workflows/reusable-sync-jira-prs.yml@main + with: + jira-project: '' # e.g., 'ESPTOOL' or 'IDFGH' +``` + +#### Sync JIRA - Issue Comments (3/3) + +```yaml +# FILE: .github/workflows/call-sync-jira-prs.yml +--- +name: Sync JIRA - Issue Comments + +on: issue_comment + +concurrency: + group: jira-issues # Ensures only one workflow in the 'jira-issues' group runs at a time (avoid sync issues) + +jobs: + call-sync-jira-pull-requests: + uses: espressif/.github/.github/workflows/reusable-sync-jira-prs.yml@main + with: + jira-project: '' # e.g., 'ESPTOOL' or 'IDFGH' +``` + +**Optional arguments**: + +| input | description | type | default | +| -------------- | --------------------------------------------- | ---- | -------- | +| jira-component | Jira component (if used in Jira project) name | str | 'GitHub' | + +📖 More info in project: https://github.com/espressif/sync-jira-actions + +> \[!TIP\] +> More information and config details in in project [espressif/sync-jira-actions](https://github.com/espressif/sync-jira-actions) + +--- ## Troubleshooting @@ -71,5 +179,3 @@ If the reusable workflow is not running in the target repository, check the foll - **Actions and Workflow Permissions**: Ensure that the target repository allows `Allow all actions and reusable workflows` (in repo `Settings -> Actions -> Actions permissions`). - **Correct Path to Reusable Workflow**: Double-check the path in the `uses:` directive. The correct format is `espressif/.github/.github/workflows/.yml@main` (note the two `.github` segments in the path; the first refers to the .github repository, and the second refers to the .github directory within that repository). - ----