Skip to content

Commit

Permalink
update some git command logic
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Dec 8, 2021
1 parent 7f20d90 commit 0638978
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 23 deletions.
6 changes: 3 additions & 3 deletions app/Common/GitAPI/AbstractGitAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Inhere\Kite\Common\GitAPI;

use JsonException;
use PhpComp\Http\Client\AbstractClient;
use PhpComp\Http\Client\Client;
use PhpComp\Http\Client\ClientInterface;
use PhpPkg\Http\Client\AbstractClient;
use PhpPkg\Http\Client\Client;
use PhpPkg\Http\Client\ClientInterface;
use Toolkit\Stdlib\Helper\JsonHelper;
use Toolkit\Stdlib\Obj\AbstractObj;
use function explode;
Expand Down
5 changes: 2 additions & 3 deletions app/Component/CliMarkdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class CliMarkdown extends GithubMarkdown
'headline' => 'lightBlue',
'paragraph' => '',
'list' => '',
'link' => 'underscore',
'image' => 'info',
'link' => 'underscore',
'code' => 'brown',
'quote' => 'cyan',
'strong' => 'bold',
Expand Down Expand Up @@ -322,7 +322,7 @@ protected function renderStrong($block): string

return ColorTag::add("**$text**", $this->theme['strong']);

return self::NL . ColorTag::add("**$text**", $this->theme['strong']) . self::NL;
// return self::NL . ColorTag::add("**$text**", $this->theme['strong']) . self::NL;
}

/**
Expand All @@ -332,7 +332,6 @@ protected function renderStrong($block): string
*/
protected function renderText($block): string
{
// vdump($block);
return $block[1];
}

Expand Down
6 changes: 3 additions & 3 deletions app/Console/Command/CheatCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
use Inhere\Console\IO\Output;
use Inhere\Kite\Kite;
use InvalidArgumentException;
use PhpComp\Http\Client\AbstractClient;
use PhpComp\Http\Client\Client;
use PhpComp\Http\Client\ClientConst;
use PhpPkg\Http\Client\AbstractClient;
use PhpPkg\Http\Client\Client;
use PhpPkg\Http\Client\ClientConst;
use Toolkit\Cli\Cli;
use Toolkit\Cli\Color;
use Toolkit\FsUtil\Dir;
Expand Down
16 changes: 8 additions & 8 deletions app/Console/Controller/GitController.php
Original file line number Diff line number Diff line change
Expand Up @@ -746,14 +746,14 @@ public function acpCommand(FlagsParser $fs, Output $output): void
* maxCommit int;Max display how many commits;;15
*
* @options
* --abbrev-commit Only display the abbrev commit ID
* --exclude Exclude contains given sub-string. multi by comma split.
* --file Export changelog message to file
* --format The git log option `--pretty` value.
* can be one of oneline, short, medium, full, fuller, reference, email, raw, format:<string> and tformat:<string>.
* --max-commit int;Max display how many commits
* --no-color bool;Dont use color render git output
* --no-merges bool;No contains merge request logs
* --ac, --abbrev-commit bool;Only display the abbrev commit ID
* --exclude Exclude contains given sub-string. multi by comma split.
* --file Export changelog message to file
* --format The git log option `--pretty` value.
* can be one of oneline, short, medium, full, fuller, reference, email, raw, format:<string> and tformat:<string>.
* --mc, --max-commit int;Max display how many commits
* --nc, --no-color bool;Dont use color render git output
* --nm, --no-merges bool;No contains merge request logs
*
* @param FlagsParser $fs
* @param Output $output
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Controller/GitHubController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Inhere\Kite\Common\GitLocal\GitHub;
use Inhere\Kite\Console\Component\RedirectToGitGroup;
use Inhere\Kite\Helper\AppHelper;
use PhpComp\Http\Client\Client;
use PhpPkg\Http\Client\Client;
use Throwable;
use Toolkit\PFlag\FlagsParser;
use function strpos;
Expand Down
1 change: 1 addition & 0 deletions app/Console/Controller/GitLabController.php
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,7 @@ public function updateCommand(FlagsParser $fs, Output $output): void
$gitlab = $this->getGitlab();

$curBranch = $gitlab->getCurBranch();
$output->info('Current Branch: ' . $curBranch);

$runner = CmdRunner::new();
$runner->setDryRun($this->flags->getOpt('dry-run'));
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
"inhere/console": "dev-master",
"inhere/sroute": "dev-master",
"cebe/markdown": "^1.2",
"colinodell/json5": "^2.2",
"gitonomy/gitlib": "^1.3",
"psr/log": "^3.0",
"psr/container": "^1.1",
"php-comp/http-client": "dev-master",
"php-comp/http-message": "^1.4",
"gitonomy/gitlib": "^1.3",
"phppkg/http-client": "dev-master",
"phppkg/http-message": "^2.0",
"phppkg/easytpl": "dev-main",
"phppkg/config": "dev-master",
"phppkg/ini": "~0.1",
"phppkg/hucron": "dev-master",
"phppkg/phpgit": "dev-master",
"phppkg/cli-markdown": "^1.0",
"phppkg/cli-markdown": "^2.0",
"toolkit/fsutil": "^2.0",
"colinodell/json5": "^2.2",
"laktak/hjson": "^2.1",
"knplabs/github-api": "^3.3",
"guzzlehttp/guzzle": "^7.4",
Expand Down
1 change: 1 addition & 0 deletions script/fnmatch.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env php
<?php


$path = '/usr/local/lib/node_modules/parcel/node_modules/_svgo@1.2.2@svgo/plugins';

var_dump(
Expand Down
6 changes: 6 additions & 0 deletions script/list-dir-files.gry
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env groovy

// kite list-dir-files.gry
new File(".").eachFile() {
file -> println file.getAbsolutePath()
}
6 changes: 6 additions & 0 deletions script/ls.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

if ($kiteDir = getenv('KITE_PATH')) {
require $kiteDir. '/app/boot.php';
}

0 comments on commit 0638978

Please sign in to comment.