Skip to content

Commit

Permalink
Merge pull request #3 from Symplicity/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
giovanne-oliveira authored May 27, 2022
2 parents d2e7319 + 1605614 commit 9854432
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CLI Build
name: CLI Release Build

on:
push:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/laravel-zero-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: CLI Beta Build
on:
push:
branches: [ beta ]

permissions: write-all

jobs:
build:
runs-on: ubuntu-latest
Expand Down
23 changes: 16 additions & 7 deletions app/Commands/CloseInterviewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CloseInterviewCommand extends Command
*
* @var string
*/
protected $signature = 'close {name : The candidate name (required)}';
protected $signature = 'close {name? : The candidate name (required)}';

/**
* The description of the command.
Expand Down Expand Up @@ -59,6 +59,11 @@ public function handle()
// Run the app

$this->line($this->getApplication()->getName());

if(!$this->argument('name') || empty($this->argument('name'))){
$candidateName = $this->ask('Please enter the candidate name');
}

$this->candidateName = str_replace(' ', '_', $this->argument('name'));

if ($this->task('Running pre-checks...', function () {
Expand Down Expand Up @@ -98,13 +103,17 @@ public function handle()
$this->backupCandidateFiles = $this->confirm('Do you want to backup the candidate files and database?', true);
$this->removeCandidateData = $this->confirm('Do you want to delete the candidate files and database?', true);

$this->completionSteps = $this->question('How many steps the candidate completed before the end of the test?', 0);
$this->completionSteps = $this->menu('How many steps the candidate completed before the end of the test?', [
'1 step',
'2 steps',
'3 steps',
'4 steps',
'5 steps',
])->disableDefaultItems()->open();

$this->hireRecommendation = $this->choice('What\'s your recommendation for this candidate?', ['strong no hire', 'not recommended', 'recommended', 'strong hire']);
$this->hireRecomendation = $this->menu('What\'s your recommendation for this candidate?', ['strong no hire', 'not recommended', 'recommended', 'strong hire'], 'strong hire')->disableDefaultItems()->open();

if($this->hireRecommendation > 1){
$this->indicatedPosition = $this->choice('What\'s the indicated position for this candidate?', ['junior', 'mid', 'senior', 'lead', 'other']);
}
$this->indicatedPosition = $this->menu('What\'s the indicated position for this candidate?', ['junior', 'mid', 'senior', 'lead', 'other'], 'other')->disableDefaultItems()->open();


$this->info('Closing interview environment for ' . $this->candidateName);
Expand Down Expand Up @@ -341,7 +350,7 @@ private function postActionHooks()
$score = 0;
DB::update(
'UPDATE code_server_instances SET hire_recommendation_level = ?, position_level_recommendation = ?, general_score = ? WHERE id = ?',
[$this->hireRecommendation, $this->indicatedPosition, $score, $this->interviewId]
[$this->hireRecommendation, $this->indicatedPosition, $score, $this->interviewId]
);


Expand Down
9 changes: 8 additions & 1 deletion app/Commands/CreateInterviewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CreateInterviewCommand extends Command
*
* @var string
*/
protected $signature = 'init {name : The candidate name (required)}';
protected $signature = 'init {name? : The candidate name (required)}';

/**
* The description of the command.
Expand Down Expand Up @@ -59,7 +59,14 @@ public function handle()
$this->line($this->getApplication()->getName());

$candidateName = $this->argument('name');

if(!$candidateName || empty($candidateName)){
$candidateName = $this->ask('Please enter the candidate name');
}

$candidateName = str_replace(' ', '_', $candidateName);


$this->info('Creating interview environment for ' . $candidateName);
$this->candidateName = $candidateName;

Expand Down

0 comments on commit 9854432

Please sign in to comment.