graphic-2d-PR
Prerequisites
- Git remotes configured (use
git remote -vto check):- upstream repository (openharmony/graphic_graphic_2d)
- user's fork (username/graphic_graphic_2d)
- Gitcode MCP tools available (if not installed, install from this repo)
- Build passes successfully
Workflow
1. Stage and Commit Changes
# Reset any staged changes and stage everything together
git reset HEAD .
git add .
git status
# Create a new branch from current branch
git checkout -b feature/descriptive-branch-name
# Commit with signoff (required)
git commit -s -m "type: brief description
Detailed explanation of the change.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>"
Note: Always use -s flag for signed commits (DCO compliance).
2. Push to Fork
# Push branch to fork (remote 'z')
git push -u z feature/descriptive-branch-name
3. Create Issue
Use gitcode MCP tool to create an issue in the upstream repository:
mcp__gitcode__create_issue
- owner: openharmony
- repo: graphic_graphic_2d
- title: Brief issue title
- body: Detailed issue description with:
- Summary
- Problem
- Solution
- Impact
- Files Modified
Example issue body:
## Summary
Brief description of the issue/change.
## Problem
What problem does this solve?
## Solution
How is it solved?
## Impact
- What changes are made?
- Performance impact
- Test results
## Files Modified
- file1.h
- file2.cpp
4. Create Pull Request
Use gitcode MCP tool to create PR in upstream repository:
mcp__gitcode__create_pull_request
- owner: openharmony
- repo: graphic_graphic_2d
- base: master (NOT main - use master)
- head: zhoutianer:feature/descriptive-branch-name
- title: PR title (matches issue title)
- body: Detailed PR description
Critical: Use master as the base branch, not main.
Example PR body:
## Summary
Brief description.
## Problem
What problem does this solve?
## Solution
Technical details of the implementation.
## Impact
- Code quality improvements
- Performance impact
- Test results
## Test plan
- [x] Build passes
- [x] All tests pass
- [x] No new warnings
## Files Modified
- file1.h
- file2.cpp
Closes #<issue-number>
The Closes #<issue-number> at the end automatically links the PR to the issue.
5. Link Issue to PR
Add a comment to the issue referencing the PR:
mcp__gitcode__create_issue_comment
- owner: openharmony
- repo: graphic_graphic_2d
- issue_number: <issue-number>
- body: Link to PR and summary
Example comment:
This issue is addressed by PR #<pr-number>: https://gitcode.com/openharmony/graphic_graphic_2d/merge_requests/<pr-number>
The PR implements:
- Key change 1
- Key change 2
Build passes in X:YY time with all tests passing.
Important Notes
- Base branch: Always use
master, notmain - Sign commits: Always use
git commit -sfor DCO compliance - Branch naming: Use descriptive names like
refactor/feature-name,fix/bug-description - Issue-PR linking: Include
Closes #<issue-number>in PR body - Remote names:
gitcode- upstream (openharmony/graphic_graphic_2d)z- fork (zhoutianer/graphic_graphic_2d)
Example Session
# After making code changes
git reset HEAD .
git add .
git checkout -b refactor/color-picker-common-impl
git commit -s -m "refactor: Extract common implementation
- Add HandleColorUpdate to base interface
- Extract CreateColorPickerInfo helper
- Remove ~200 lines of duplication
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>"
git push -u z refactor/color-picker-common-impl
Then use MCP tools to create issue #22224, PR #28311, and link them.
Troubleshooting
PR creation fails with API error (400):
- Check that base branch is
master, notmain - Ensure branch was pushed to fork first
Issue not linking to PR:
- Verify
Closes #<issue-number>is in PR body - Check issue number is correct
- Add manual comment to issue if auto-link fails
More from openharmonyinsight/openharmony-skills
openharmony-security-review
Use when reviewing OpenHarmony C++ system service code for security vulnerabilities, particularly IPC handlers, multithreaded components, or code handling sensitive user data
77openharmony-build
This skill should be used when the user asks to "编译 OpenHarmony", "build OpenHarmony", "编译完整代码", "执行编译", "编译 OpenHarmony 代码", "快速编译", "跳过gn编译", "fast-build", "编译测试", "编译测试用例", "build ace_engine_test", "编译 sdk", "编译 SDK", "build sdk", "build SDK", "编译 ohos-sdk", "编译测试列表", "build test list", "按列表编译测试", "编译指定测试", or mentions building the full OpenHarmony system, fast rebuild, test compilation, SDK compilation, or building tests from a target list. Handles complete build process including build execution, success verification, and failure log analysis with primary focus on out/{product}/build.log.
55ohos-chromium-security-review
|
55openharmony-download
Interactive OpenHarmony source code download with mirror selection (GitCode/Gitee/GitHub), environment checking, branch selection, and real-time progress. Use when user requests:"下载 OpenHarmony", "download OpenHarmony", "下载源码", "获取源码", "拉取代码", "clone openharmony", or "repo init".
53ai-generated-ut-code-review
Use when reviewing or scoring AI-generated unit tests/UT code, especially when coverage, assertion effectiveness, or test quality is in question and a numeric score, risk level, or must-fix checklist is needed
50compile-analysis
This skill should be used when the user asks to "分析编译效率", "分析编译时间", "查看头文件依赖", "保存编译命令", "提取编译命令", "生成编译脚本", "保存这个文件的编译命令", "单独编译这个文件", "编译单个文件", "单编文件", "独立编译文件", "分析这个文件的头文件依赖", "头文件依赖关系", "这个文件依赖了多少头文件", "analyze compilation", "check header dependencies", "分析文件编译开销", "save compile command", "extract compile command", "generate compile script", "compile single file", "compile individual file", "standalone compile", "analyze header dependencies", "header dependency tree", "how many header files", or mentions analyzing compilation performance, build times, include dependencies, extracting/saving compilation commands, generating standalone compilation scripts, compiling individual files in isolation, or analyzing header file dependency relationships for specific source files in the ace_engine project. Provides comprehensive compilation efficiency analysis including timing, resource usage, dependency tree visualization with automatic saving, the ability to save reusable compilation scripts with performance monitoring, and standalone compilation capabilities using generated scripts.
49