Skip to content

ci: fix empty branch display in pre-release publish message - #71082

Merged
Aaron ("AJ") Steers (aaronsteers) merged 5 commits into
masterfrom
devin/1767292618-fix-branch-display-prerelease
Jan 1, 2026
Merged

ci: fix empty branch display in pre-release publish message#71082
Aaron ("AJ") Steers (aaronsteers) merged 5 commits into
masterfrom
devin/1767292618-fix-branch-display-prerelease

Conversation

@aaronsteers

@aaronsteers Aaron ("AJ") Steers (aaronsteers) commented Jan 1, 2026

Copy link
Copy Markdown
Member

What

Fixes the empty "Branch:" field in pre-release connector publish messages. When /publish-connectors-prerelease is invoked (via slash command or MCP tool), the status comment shows Branch: `` instead of the actual branch name.

Example of the bug (from airbytehq/airbyte#71063):

Branch: ``

How

Simplified the workflow to always derive the git ref from the PR number:

  1. Made pr a required input (was optional)
  2. Use refs/pull/${{ inputs.pr }}/head inline for checkout and downstream publish_connectors.yml call
  3. Changed comment display from Branch: ... to PR: #... with a clickable link
  4. Added note to gitref input description that it's ignored (kept for slash command dispatch compatibility)

Key design decisions:

  • PR number is the single source of truth - no fallback logic needed
  • gitref input is kept but ignored (required by slash command dispatch static args)
  • No GitHub API calls needed - refs/pull/{pr}/head is the canonical way to reference PR code

Review guide

  1. .github/workflows/publish-connectors-prerelease-command.yml - All changes in this file

Human review checklist:

  • Verify refs/pull/{pr}/head works correctly for checkout and downstream publish_connectors.yml
  • Confirm the UX change from "Branch: ..." to "PR: #..." is acceptable
  • Verify existing callers (slash command dispatcher, MCP tool) always pass PR number
  • Consider if fork PRs need special handling (should work since refs/pull/{pr}/head is in the base repo)

User Impact

Pre-release publish status comments will now correctly display a clickable PR link instead of showing an empty branch value.

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Link to Devin run: https://app.devin.ai/sessions/8a26b7fcb0234672aced61d260dd706d
Requested by: AJ Steers (Aaron ("AJ") Steers (@aaronsteers))

Co-Authored-By: AJ Steers <aj@airbyte.io>
@devin-ai-integration

Copy link
Copy Markdown
Contributor
Original prompt from AJ Steers
Received message in Slack channel #ask-devin-ai:

@Devin - The "branch" variable seems unset in the message here. Can you fix?
Thread URL: https://airbytehq-team.slack.com/archives/C08BHPUMEPJ/p1767292373665049

ATTACHMENT:"https://app.devin.ai/attachments/003d1097-e12b-47fc-af8a-969ec1e54411/image.png"

@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions

github-actions Bot commented Jan 1, 2026

Copy link
Copy Markdown
Contributor

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Helpful Resources

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • /format-fix - Fixes most formatting issues.
  • /bump-version - Bumps connector versions.
    • You can specify a custom changelog by passing changelog. Example: /bump-version changelog="My cool update"
    • Leaving the changelog arg blank will auto-populate the changelog from the PR title.
  • /bump-progressive-rollout-version - Bumps connector version with an RC suffix for progressive rollouts.
    • Creates a release candidate version (e.g., 2.16.10-rc.1) with enableProgressiveRollout: true
    • Example: /bump-progressive-rollout-version changelog="Add new feature for progressive rollout"
  • /run-cat-tests - Runs legacy CAT tests (Connector Acceptance Tests)
  • /run-regression-tests - Runs regression tests for the modified connector(s).
  • /build-connector-images - Builds and publishes a pre-release docker image for the modified connector(s).
  • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
  • Connector release lifecycle (AI-powered):
    • /ai-prove-fix - Runs prerelease readiness checks, including testing against customer connections.
    • /ai-canary-prerelease - Rolls out prerelease to 5-10 connections for canary testing.
    • /ai-release-watch - Monitors rollout post-release and tracks sync success rates.
  • JVM connectors:
    • /update-connector-cdk-version connector=<CONNECTOR_NAME> - Updates the specified connector to the latest CDK version.
      Example: /update-connector-cdk-version connector=destination-bigquery
    • /bump-bulk-cdk-version bump=patch changelog='foo' - Bump the Bulk CDK's version. bump can be major/minor/patch.
  • Python connectors:
    • /poe connector source-example lock - Run the Poe lock task on the source-example connector, committing the results back to the branch.
    • /poe source example lock - Alias for /poe connector source-example lock.
    • /poe source example use-cdk-branch my/branch - Pin the source-example CDK reference to the branch name specified.
    • /poe source example use-cdk-latest - Update the source-example CDK dependency to the latest available version.

📝 Edit this welcome message.

devin-ai-integration Bot and others added 2 commits January 1, 2026 19:03
When the workflow is triggered via MCP tool, it runs on master but
passes gitref in inputs. However, if inputs.gitref is empty for any
reason, the previous fallback to github.ref_name would incorrectly
show 'master' instead of the PR branch.

This fix adds a 'resolve-gitref' step that:
1. Uses inputs.gitref if provided
2. Falls back to fetching the PR head ref via GitHub API when PR number is available
3. Only falls back to github.ref_name as last resort

The effective-gitref is now used consistently for:
- Checkout
- Comment display
- Downstream publish_connectors.yml call

Co-Authored-By: AJ Steers <aj@airbyte.io>
Simplify the gitref resolution to use GitHub's PR ref syntax directly:
- When PR number is provided, use refs/pull/{pr}/head (no API call needed)
- This ensures the execution source cannot be overridden by callers
- Change comment display from 'Branch: ...' to 'PR: #...' with link

The PR number is now the single source of truth for prerelease publishing.

Co-Authored-By: AJ Steers <aj@airbyte.io>
Comment thread .github/workflows/publish-connectors-prerelease-command.yml Outdated
devin-ai-integration Bot and others added 2 commits January 1, 2026 19:25
Co-Authored-By: AJ Steers <aj@airbyte.io>
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) merged commit afa889f into master Jan 1, 2026
33 checks passed
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) deleted the devin/1767292618-fix-branch-display-prerelease branch January 1, 2026 19:28
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.

1 participant