|
22 | 22 | use Symfony\Component\Console\Helper\QuestionHelper; |
23 | 23 | use Symfony\Component\Console\Input\InputInterface; |
24 | 24 | use Symfony\Component\Console\Output\OutputInterface; |
| 25 | +use Symfony\Component\Console\Question\ChoiceQuestion; |
25 | 26 | use Symfony\Component\Console\Question\ConfirmationQuestion; |
26 | 27 | use Symfony\Component\Console\Question\Question; |
27 | 28 |
|
@@ -167,6 +168,43 @@ protected function get_component_data() |
167 | 168 | } |
168 | 169 | } |
169 | 170 |
|
| 171 | + // Special logic for GitHub Actions options |
| 172 | + if ($component === 'githubactions') |
| 173 | + { |
| 174 | + $question = $this->language->lang('SKELETON_QUESTION_COMPONENT_GITHUBACTIONS') . $this->language->lang('COLON'); |
| 175 | + $choices = [ |
| 176 | + $this->language->lang('SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_0'), |
| 177 | + $this->language->lang('SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_1'), |
| 178 | + $this->language->lang('SKELETON_QUESTION_COMPONENT_GITHUBACTIONS_2'), |
| 179 | + ]; |
| 180 | + |
| 181 | + $question = new ChoiceQuestion($question, $choices, 0); |
| 182 | + |
| 183 | + $choice = $this->helper->ask($this->input, $this->output, $question); |
| 184 | + $index = array_search($choice, $choices, true); |
| 185 | + |
| 186 | + $this->data['components']['githubactions'] = false; |
| 187 | + $this->data['components']['githubactions_deprecated'] = false; |
| 188 | + |
| 189 | + if ($index === 1) |
| 190 | + { |
| 191 | + $this->data['components']['githubactions'] = true; |
| 192 | + } |
| 193 | + else if ($index === 2) |
| 194 | + { |
| 195 | + $this->data['components']['githubactions_deprecated'] = true; |
| 196 | + } |
| 197 | + |
| 198 | + continue; |
| 199 | + } |
| 200 | + |
| 201 | + if ($component === 'githubactions_deprecated') |
| 202 | + { |
| 203 | + // Already handled via githubactions logic |
| 204 | + continue; |
| 205 | + } |
| 206 | + |
| 207 | + // Default logic for all other components |
170 | 208 | $this->data['components'][$component] = $this->get_user_input('component_' . $component, $details['default']); |
171 | 209 | } |
172 | 210 | } |
|
0 commit comments