Skip to content

Add develop branch to CI pipeline triggers#192

Open
kirich1409 wants to merge 2 commits into
developfrom
chore/ci-develop-triggers
Open

Add develop branch to CI pipeline triggers#192
kirich1409 wants to merge 2 commits into
developfrom
chore/ci-develop-triggers

Conversation

@kirich1409
Copy link
Copy Markdown
Contributor

Summary

  • Mirror main triggers onto develop for the new gitflow integration branch
  • ci.yml, codeql.yml, dependency-review.yml now run on push/PR to develop
  • docs.yml builds documentation on develop but publishes to GitHub Pages only from main or release tags
  • publish.yml emits SNAPSHOT artifacts from both main and develop; tagged release publication remains tag-driven and untouched

Test plan

  • CI workflows trigger correctly on push to develop
  • CI workflows trigger correctly on PRs targeting develop
  • Documentation builds on develop push but is NOT published to GitHub Pages
  • SNAPSHOT publication runs on push to develop
  • Tagged release flow on main remains unaffected

Mirror main triggers onto develop for the new gitflow integration branch:
ci, codeql, dependency-review build/scan on push/PR to develop, docs site
is built on develop but published to Pages only from main or release tags,
and publish.yml emits SNAPSHOTs from both branches while tagged release
publication remains main-only.
Copilot AI review requested due to automatic review settings May 17, 2026 17:34
@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Extend CI/CD pipeline triggers to develop branch

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Extend CI/CD pipeline triggers to develop branch for gitflow integration
• Build and scan workflows now run on develop push and pull requests
• Documentation builds on develop but publishes only from main or tags
• SNAPSHOT artifacts published from both main and develop branches
Diagram
flowchart LR
  develop["develop branch"] -->|push/PR| ci["CI, CodeQL, Dependency Review"]
  develop -->|push| docs["Build docs"]
  docs -->|condition check| pages["Publish to Pages?"]
  pages -->|main or tags only| publish["Publish to GitHub Pages"]
  develop -->|push| snapshot["Publish SNAPSHOT artifacts"]
  main["main branch"] -->|push/PR| ci
  main -->|push| docs
  main -->|push| snapshot
  tags["Release tags"] -->|push| docs
  tags -->|push| publish
Loading

Grey Divider

File Changes

1. .github/workflows/ci.yml ⚙️ Configuration changes +2/-2

Add develop branch to CI triggers

• Added develop branch to push trigger alongside main
• Added develop branch to pull_request trigger alongside main

.github/workflows/ci.yml


2. .github/workflows/codeql.yml ⚙️ Configuration changes +2/-2

Add develop branch to CodeQL triggers

• Added develop branch to push trigger alongside main
• Added develop branch to pull_request trigger alongside main

.github/workflows/codeql.yml


3. .github/workflows/dependency-review.yml ⚙️ Configuration changes +1/-1

Add develop branch to dependency review

• Added develop branch to pull_request trigger alongside main

.github/workflows/dependency-review.yml


View more (2)
4. .github/workflows/docs.yml ⚙️ Configuration changes +4/-2

Build docs on develop, publish only from main

• Added develop branch to push trigger for building documentation
• Added develop branch to pull_request trigger for building documentation
• Updated publish condition to explicitly check for main branch or release tags
• Prevents documentation publication from develop branch while still building it

.github/workflows/docs.yml


5. .github/workflows/publish.yml ⚙️ Configuration changes +1/-0

Add develop branch to publish workflow

• Added develop branch to push trigger for artifact publication
• Enables SNAPSHOT artifact publishing from develop alongside main

.github/workflows/publish.yml


Grey Divider

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented May 17, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Docs not triggered on tags ✓ Resolved 🐞 Bug ≡ Correctness
Description
In docs.yml, publish-docs is written to allow publishing on release tags (refs/tags/*), but the
workflow never triggers on tag pushes because on.push is configured only for branches.
Additionally, tag patterns are defined under pull_request, yet publishing is gated to
github.event_name == 'push', making those PR tag patterns ineffective and misleading.
Code

.github/workflows/docs.yml[64]

+    if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
Evidence
The workflow configuration only starts on pushes to the main/develop branches and on pull
requests targeting those branches, with no on.push.tags configured, so a tag push cannot trigger
the workflow. At the same time, the publish-docs logic explicitly checks for tag refs (via
startsWith(github.ref, 'refs/tags/')) but also requires github.event_name == 'push', meaning the
tag-based branch of the condition can never be reached without a tag push trigger; the presence of
tags: under pull_request cannot change this because the job only runs its publishing path for
push events.

.github/workflows/docs.yml[3-14]
.github/workflows/docs.yml[59-65]
.github/workflows/docs.yml[8-14]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`publish-docs` is intended to publish docs on pushes to `main` or on release tags (it checks `startsWith(github.ref, 'refs/tags/')`), but the workflow does not trigger on tag pushes because `on.push` is limited to branches. Additionally, `tags:` patterns under `pull_request:` are misleading because publishing is explicitly gated to `github.event_name == 'push'`, so PR tag patterns cannot enable tag publishing.

## Issue Context
The workflow intent (comment + `if:` logic) suggests documentation should publish on pushes to `main` and on release tags, but the current event triggers and job gating make tag publishing unreachable and the `pull_request.tags` configuration ineffective.

## Fix Focus Areas
- .github/workflows/docs.yml[3-15]
- .github/workflows/docs.yml[59-65]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. SNAPSHOT version collision risk 🐞 Bug ☼ Reliability
Description
publish.yml now runs on pushes to both main and develop, but for any non-tag push it computes the
exact same VERSION_NAME (BASE + "-SNAPSHOT") from gradle.properties. This makes main and develop
publish identical snapshot coordinates, causing artifacts to overwrite each other or publish
failures if the repository rejects re-publishing the same version.
Code

.github/workflows/publish.yml[R8-10]

    branches:
      - main
+      - develop
Evidence
The trigger now includes develop. The version script sets the same BASE-SNAPSHOT for any non-tag
push, and BASE is taken from gradle.properties, so both branches will compute the same VERSION_NAME
when they share the same VERSION_NAME baseline.

.github/workflows/publish.yml[3-11]
.github/workflows/publish.yml[30-41]
gradle.properties[38-40]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Branch pushes to both `main` and `develop` now publish SNAPSHOTs, but the computed SNAPSHOT version is identical across branches (`${BASE}-SNAPSHOT`). This can cause either (a) branch snapshots overwriting each other, or (b) repeated publish failures depending on repository policy.

### Issue Context
The workflow derives `BASE` from `gradle.properties:VERSION_NAME`, strips `-SNAPSHOT`, then appends `-SNAPSHOT` for all non-tag pushes.

### Fix Focus Areas
- .github/workflows/publish.yml[3-11]
- .github/workflows/publish.yml[30-41]

### What to change
Choose one:
- Encode the branch in the snapshot version, e.g. `VERSION="${BASE}-${GITHUB_REF_NAME}-SNAPSHOT"` for non-tag pushes.
- Or publish develop snapshots to a separate repository/coordinate (if supported by your Gradle publishing setup).
- Or gate publishing so only one branch produces the canonical SNAPSHOT (and keep the other branch build-only).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread .github/workflows/docs.yml
Comment on lines 8 to +10
branches:
- main
- develop
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Snapshot version collision risk 🐞 Bug ☼ Reliability

publish.yml now runs on pushes to both main and develop, but for any non-tag push it computes the
exact same VERSION_NAME (BASE + "-SNAPSHOT") from gradle.properties. This makes main and develop
publish identical snapshot coordinates, causing artifacts to overwrite each other or publish
failures if the repository rejects re-publishing the same version.
Agent Prompt
### Issue description
Branch pushes to both `main` and `develop` now publish SNAPSHOTs, but the computed SNAPSHOT version is identical across branches (`${BASE}-SNAPSHOT`). This can cause either (a) branch snapshots overwriting each other, or (b) repeated publish failures depending on repository policy.

### Issue Context
The workflow derives `BASE` from `gradle.properties:VERSION_NAME`, strips `-SNAPSHOT`, then appends `-SNAPSHOT` for all non-tag pushes.

### Fix Focus Areas
- .github/workflows/publish.yml[3-11]
- .github/workflows/publish.yml[30-41]

### What to change
Choose one:
- Encode the branch in the snapshot version, e.g. `VERSION="${BASE}-${GITHUB_REF_NAME}-SNAPSHOT"` for non-tag pushes.
- Or publish develop snapshots to a separate repository/coordinate (if supported by your Gradle publishing setup).
- Or gate publishing so only one branch produces the canonical SNAPSHOT (and keep the other branch build-only).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged as an accepted trade-off for the transitional gitflow setup — SNAPSHOTs from both branches are intentional. Maven Central permits SNAPSHOT overwrites; the later push wins. If collisions become a problem in practice we'll either encode the branch into the version (${BASE}-${GITHUB_REF_NAME}-SNAPSHOT) or restrict canonical SNAPSHOTs to develop in a follow-up PR. Not changing here.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends existing GitHub Actions workflows so CI/CD runs not only on main, but also on the new develop branch as part of a gitflow-style integration setup.

Changes:

  • CI (ci.yml) and CodeQL (codeql.yml) now trigger on push/PR to develop in addition to main.
  • Dependency Review now runs for PRs targeting develop.
  • Publish pipeline (publish.yml) now triggers on pushes to develop as well as main.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/publish.yml Adds develop to push triggers for publishing pipeline.
.github/workflows/docs.yml Adds develop triggers and tightens publish gating to avoid publishing from develop.
.github/workflows/dependency-review.yml Enables dependency review for PRs into develop.
.github/workflows/codeql.yml Enables CodeQL on develop pushes/PRs.
.github/workflows/ci.yml Enables CI on develop pushes/PRs.
Comments suppressed due to low confidence (1)

.github/workflows/docs.yml:14

  • The tag filters here use regex-like syntax ([0-9]+), but GitHub Actions tag filters are glob patterns. If you intend to match release tags like v1.0.0 / v1.2.3-rc1, these patterns likely won’t match; switch to glob-style patterns (e.g., [0-9]*) or a broader v* once tags are moved under the push trigger.
      - main
      - develop
    tags:
      - "v[0-9]+.[0-9]+.[0-9]+"
      - "v[0-9]+.[0-9]+.[0-9]+-*"

Comment thread .github/workflows/docs.yml Outdated
Comment on lines 8 to 14
pull_request:
branches:
- main
- develop
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-*"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b8e139a: tags: moved from on.pull_request to on.push. The pre-existing if: clause in publish-docs now correctly gates publication on main pushes and tag pushes.

Comment on lines 6 to +11
- main
- develop
pull_request:
branches:
- main
- develop
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid security-hardening point. The workflow-level contents: write predates this PR and is out of scope for the gitflow trigger update. Tracked for a follow-up security PR that scopes the token down to the publish-docs job only.

Comment on lines 5 to +10
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-*"
branches:
- main
- develop
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These patterns are empirically functional: v1.0.0-Beta1 matched and triggered the recent release (commit 7a4dd94 from the publish-xcframework job). GitHub Actions filter globs support [0-9]+ (one or more chars in range), so the patterns work as intended. Not changing.

CodeQL diff-range scanner fails with "no source code seen during build"
when a PR touches no Java/Kotlin sources. Add paths-ignore for workflow,
docs, and markdown files so docs/CI-config PRs no longer break the scan;
weekly schedule still does a full scan.

Move docs.yml tag patterns from pull_request to push — pull_request does
not support tag filters, so tag-driven docs publication was unreachable
despite the publish-docs if: clause checking for refs/tags/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants