-
Notifications
You must be signed in to change notification settings - Fork 2
chore: sync workflow templates #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,103 @@ | ||||||
| # Fix Merge Conflicts | ||||||
|
|
||||||
| This PR has **merge conflicts** that must be resolved before CI can run or the PR can be merged. | ||||||
|
|
||||||
| ## Your Task | ||||||
|
|
||||||
| Resolve all merge conflicts by integrating changes from the base branch with this PR's changes. | ||||||
|
|
||||||
| ## Conflict Detection | ||||||
|
|
||||||
| {{#if conflict_files}} | ||||||
| **Potentially conflicting files:** | ||||||
| {{#each conflict_files}} | ||||||
| - `{{this}}` | ||||||
| {{/each}} | ||||||
| {{else}} | ||||||
| Check `git status` to identify files with conflicts. | ||||||
| {{/if}} | ||||||
|
|
||||||
| ## Resolution Steps | ||||||
|
|
||||||
| 1. **Fetch latest base branch:** | ||||||
| ```bash | ||||||
| git fetch origin {{base_branch}} | ||||||
| ``` | ||||||
| > Note: Replace `{{base_branch}}` with the actual base branch name (e.g., `main` or `master`) | ||||||
|
|
||||||
| 2. **Attempt merge:** | ||||||
| ```bash | ||||||
| git merge origin/{{base_branch}} | ||||||
| ``` | ||||||
|
|
||||||
| 3. **For each conflicting file:** | ||||||
| - Look for conflict markers: `<<<<<<<`, `=======`, `>>>>>>>` | ||||||
| - Understand what each side (HEAD vs incoming) intended | ||||||
| - Combine the changes intelligently: | ||||||
| - If changes are to different parts: keep both | ||||||
| - If changes conflict: prefer the newer/more complete version | ||||||
| - If changes are incompatible: adapt the PR's code to work with new base | ||||||
| - Remove all conflict markers | ||||||
|
|
||||||
| 4. **Verify resolution:** | ||||||
| ```bash | ||||||
| # Check no conflict markers remain | ||||||
| git diff --check | ||||||
|
|
||||||
| # Run the project's test suite (language-specific) | ||||||
| # For Python: pytest | ||||||
| # For JavaScript: npm test | ||||||
| # For other: check the project's README or CI config | ||||||
| ``` | ||||||
|
|
||||||
| 5. **Commit the resolution:** | ||||||
| ```bash | ||||||
| git add . | ||||||
| git commit -m "fix: resolve merge conflicts with {{base_branch}}" | ||||||
| ``` | ||||||
|
|
||||||
| ## Resolution Guidelines | ||||||
|
|
||||||
| ### When to prefer PR changes: | ||||||
| - PR adds new functionality not in main | ||||||
| - PR fixes a bug that main doesn't address | ||||||
| - PR has more complete implementation | ||||||
|
|
||||||
| ### When to prefer main changes: | ||||||
| - Base branch has breaking API changes PR must adapt to | ||||||
| - Base branch has bug fixes PR should incorporate | ||||||
| - Base branch renamed/moved files PR still references | ||||||
|
|
||||||
| ### When to combine: | ||||||
| - Both sides add different functions/methods | ||||||
| - Both sides add different imports | ||||||
| - Both sides modify different parts of the same function | ||||||
|
|
||||||
| ## Common Conflict Patterns | ||||||
|
|
||||||
| ### Import conflicts (Python example): | ||||||
| ```python | ||||||
| <<<<<<< HEAD | ||||||
| from module import foo, bar | ||||||
| ======= | ||||||
| from module import foo, baz | ||||||
| >>>>>>> origin/{{base_branch}} | ||||||
|
||||||
| >>>>>>> origin/{{base_branch}} | |
| >>>>>>> origin/main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template variable
{{base_branch}}is used but may not be replaced in all contexts. On line 26, the note says "Replace{{base_branch}}with the actual base branch name" which suggests manual replacement is expected. However, this contradicts the templating syntax which typically expects automatic substitution. Clarify whether this is a Handlebars/Mustache template that will be processed, or if users should manually replace these placeholders.