-
-
Notifications
You must be signed in to change notification settings - Fork 7
chore(Fork): add custom command #717
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,47 @@ | ||||||
| [ | ||||||
| { | ||||||
| "version" : 2 | ||||||
| }, | ||||||
| { | ||||||
| "action" : { | ||||||
| "script" : "git push gitcode.com --delete refs/heads/${ref}\ngit push gitee.com --delete refs/heads/${ref}\ngit checkout main\ngit branch --delete --force ${ref}", | ||||||
|
||||||
| "script" : "git push gitcode.com --delete refs/heads/${ref}\ngit push gitee.com --delete refs/heads/${ref}\ngit checkout main\ngit branch --delete --force ${ref}", | |
| "script" : "git push gitcode.com --delete refs/heads/${ref}\ngit push gitee.com --delete refs/heads/${ref}\ngit checkout main\ngit branch --delete ${ref}", |
Copilot
AI
Nov 25, 2025
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.
With showOutput set to false, users won't see error messages if any of the destructive delete operations fail. This can lead to confusion about whether the operations succeeded or failed. Consider setting this to true for better user feedback, especially for destructive operations.
| "showOutput" : false, | |
| "showOutput" : true, |
Copilot
AI
Nov 25, 2025
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.
With showOutput set to false and --verbose flags in the git commands, the verbose output won't be visible to users. Either remove the --verbose flags since the output is hidden, or set showOutput to true to make the verbose output useful.
| "script" : "git push origin refs/heads/${ref} --verbose\ngit push gitcode.com refs/heads/${ref} --verbose\ngit push gitee.com refs/heads/${ref} --verbose", | |
| "script" : "git push origin refs/heads/${ref}\ngit push gitcode.com refs/heads/${ref}\ngit push gitee.com refs/heads/${ref}", |
Copilot
AI
Nov 25, 2025
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 "Push All" command chains multiple push operations without error handling. If one push fails (e.g., network issues, authentication problems), subsequent pushes will still be attempted but the user may not be aware of the failure since showOutput is false. Consider enabling output visibility or adding error handling between commands.
| "showOutput" : false, | |
| "showOutput" : true, |
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 "Delete All" command chains multiple destructive git operations without error handling. If any of the remote delete operations fail (e.g., remote doesn't exist or branch not found), the subsequent commands will still execute, potentially leading to unexpected behavior. Consider adding error handling or splitting this into separate commands for better control and feedback.