Skip to content

Conversation

dubbo-go-bot
Copy link

🔄 Upstream Sync from Community Fork

This PR automatically syncs changes from the community fork to the upstream repository.

Original Contribution

Original PR Description


This pull request streamlines and simplifies the workflow for syncing changes from the community fork to the upstream repository. It removes fork-specific configuration and files, clarifies documentation and messaging, and improves error handling for rebase conflicts. The changes mainly affect the .github/workflows/sync-to-upstream.yml workflow and remove .github/pull.yml.

Summary by Sourcery

Refactor and simplify the GitHub Actions sync-to-upstream workflow by removing fork-specific configuration and files, tightening execution conditions, and improving inline documentation and error messages.

Enhancements:

  • Improve PR body and comment templates for clarity and brevity
  • Enhance rebase conflict handling with a concise code block showing manual resolution steps

CI:

  • Rename and streamline the sync-to-upstream workflow to run only in fork repositories and on merged PRs to the configured base branch
  • Remove the step that excluded and deleted fork-specific workflow files and delete the obsolete .github/pull.yml file

Documentation:

  • Clarify and standardize inline comments and environment configuration instructions in the workflow

Summary by CodeRabbit

  • Chores
    • Removed an outdated upstream sync workflow.
    • Reworked the upstream sync flow to operate only when run from forks and to validate the fork target before syncing.
    • Expanded the sync cycle to create a dedicated sync branch, rebase from upstream, and open an upstream PR automatically.
    • Simplified messaging and notifications with clearer success/skip signals.
    • Streamlined error handling with concise rebase-conflict messaging and actionable manual-resolution steps.

All commits preserve original authorship.

Note: Auto-created when PR #11 was merged into dubbo-go-pixiu/dubbo-go-pixiu:develop.

cc @Similarityoung

add GitHub Actions workflow for automatic upstream sync
This is a test PR to verify the automatic sync workflow functionality.

Expected behavior after merging to dubbo-go-pixiu/dubbo-go-pixiu:develop:
1. Workflow should trigger automatically
2. Create sync branch (auto-sync-YYYYMMDD-HHMMSS)
3. Rebase onto apache/dubbo-go-pixiu:develop
4. Remove fork-specific workflow files automatically
5. Create PR in apache/dubbo-go-pixiu
6. Comment on this PR with upstream link

Success criteria:
- Workflow runs without errors
- Upstream PR created with this commit
- Workflow files NOT present in upstream PR
- Original commit author preserved

Test Date: 2025-10-02 07:14:07 UTC
* test: verify upstream sync workflow

This is a test PR to verify the automatic sync workflow functionality.

Expected behavior after merging to dubbo-go-pixiu/dubbo-go-pixiu:develop:
1. Workflow should trigger automatically
2. Create sync branch (auto-sync-YYYYMMDD-HHMMSS)
3. Rebase onto apache/dubbo-go-pixiu:develop
4. Remove fork-specific workflow files automatically
5. Create PR in apache/dubbo-go-pixiu
6. Comment on this PR with upstream link

Success criteria:
- Workflow runs without errors
- Upstream PR created with this commit
- Workflow files NOT present in upstream PR
- Original commit author preserved

Test Date: 2025-10-02 07:14:07 UTC

* fix: use pull_request_target to access secrets from fork PRs

The pull_request event does not provide access to secrets when
triggered by PRs from forks (security measure). Using
pull_request_target instead, which runs in the context of the
base repository and has access to secrets.

This fixes the 'Input required and not supplied: token' error.
* test: verify upstream sync workflo

* fix: use pull_request_target to access secrets from fork PRs

The pull_request event does not provide access to secrets when
triggered by PRs from forks (security measure). Using
pull_request_target instead, which runs in the context of the
base repository and has access to secrets.

This fixes the 'Input required and not supplied: token' error.

* fix: specify repository for PR comment in Step 9

When using pull_request_target, the workflow runs in the base
repository context. We need to explicitly specify --repo parameter
for gh pr comment to ensure it comments on the correct PR.

Also added error handling to prevent workflow failure if commenting
fails, since the main task (creating upstream PR) is already done.

* fix: delete doc
* feat: enhance upstream sync workflow configuration

* feat: refine upstream sync workflow conditions and cleanup steps

* feat: add branch target check to upstream sync workflow
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.21%. Comparing base (26606a8) to head (40e41e8).
⚠️ Report is 74 commits behind head on develop.

❗ There is a different number of reports uploaded between BASE (26606a8) and HEAD (40e41e8). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (26606a8) HEAD (40e41e8)
1 0
Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #781       +/-   ##
============================================
- Coverage    54.67%   16.21%   -38.46%     
============================================
  Files          671      224      -447     
  Lines        78658    16723    -61935     
============================================
- Hits         43006     2712    -40294     
+ Misses       31981    13750    -18231     
+ Partials      3671      261     -3410     
Flag Coverage Δ
unittests 16.21% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants