Skip to content

ci(translation-sync): remove redundant push trigger#460

Merged
lizhengfeng101 merged 2 commits into
alibaba:mainfrom
Shaurya2k06:ci/translation-sync-pr-only
Jul 23, 2026
Merged

ci(translation-sync): remove redundant push trigger#460
lizhengfeng101 merged 2 commits into
alibaba:mainfrom
Shaurya2k06:ci/translation-sync-pr-only

Conversation

@Shaurya2k06

Copy link
Copy Markdown
Contributor

Description

The translation-sync workflow triggered on both push and pull_request. Since merges go through PRs, the PR trigger already validates translation sync before merge — re-running on the post-merge push to main only re-exercises the blocking README check and wastes CI.

This removes the push: trigger block from .github/workflows/translation-sync.yml, leaving only pull_request: with the existing paths: filter. Jobs, container, steps, and env vars are unchanged.

Closes #459.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional changes)
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

  • make check passes locally

  • Manual testing (describe below)

  • Confirmed on: contains only pull_request with the original paths: filter

  • Confirmed jobs/steps below on: are unchanged

Checklist

  • My code follows the project's coding style (go fmt, go vet)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly (if applicable)
  • I have signed the CLA

Related Issues

Closes #459.

PR validation already covers translation sync before merge; re-running
on the post-merge push to main wastes CI.

Signed-off-by: shaurya2k06 <shaurya2k06@gmail.com>
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 1 issue(s) in this PR.

  • ✅ Successfully posted inline: 0 comment(s)
  • ❌ Failed to post inline: 1 comment(s)

📄 .github/workflows/translation-sync.yml (L46-L46)

⚠️ GitHub could not post this as an inline comment: Unprocessable Entity: "Line could not be resolved"

Since the push trigger has been removed and this workflow now only runs on pull_request, this if condition is always true and can be removed to simplify the workflow. Keeping it is harmless but adds unnecessary noise.

@lizhengfeng101

Copy link
Copy Markdown
Collaborator

Nitpick: With the push: trigger removed, this workflow can now only be triggered by pull_request, which makes the if: ${{ github.event_name == 'pull_request' }} guard on the "Check docs translation sync" step always evaluate to true — it's now technically redundant.

That said, I'd lean toward keeping it: it's a sensible defensive guard. If the push: trigger is ever reintroduced, this step would otherwise run on push events where github.event.pull_request.base.sha / head.sha are empty, breaking the diff. Keeping the condition makes the step's PR-only intent explicit and self-documenting.

Optional suggestion: add a short inline comment noting that the guard is intentional/defensive, so a future reader doesn't "clean it up" as dead code.

@Shaurya2k06

Copy link
Copy Markdown
Contributor Author

Fair enough. I'll make the changes required.

Signed-off-by: shaurya2k06 <shaurya2k06@gmail.com>

@lizhengfeng101 lizhengfeng101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@lizhengfeng101
lizhengfeng101 merged commit 6f4e875 into alibaba:main Jul 23, 2026
6 checks passed
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.

ci(translation-sync): remove redundant push trigger

2 participants