run method
Runs this command.
The return value is wrapped in a Future
if necessary and returned by
CommandRunner.runCommand
.
Implementation
@override
FutureOr<dynamic>? run() async {
final repo = RepoOption.repo(argResults, usageException);
final num = NumOption.num(argResults, usageException);
final base = BaseOption.base(argResults, usageException);
final head = HeadOption.head(argResults, usageException);
final dir = DirOption.dir(argResults, usageException);
await _deletePreviousComments(repo: repo, num: num);
final indicates = await _getIndicates(
dir: dir,
base: base,
head: head,
);
if (indicates.isEmpty) {
log.i('In this Pull Request ( #$num ), no issues found!');
return;
}
final result = await _commentIndicates(
repo: repo,
num: num,
indicates: indicates,
);
log.i(result);
}