-
Notifications
You must be signed in to change notification settings - Fork 196
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
[AL-587] Adding env:commit and env:code-log commands #1250
Conversation
@marktheunissen, thanks for your PR! By analyzing the blame information on this pull request, we identified @TeslaDethray and @ronan to be potential reviewers |
be8b05c
to
85b86e1
Compare
$env = $site->environments->get($env_name); | ||
|
||
// TODO: The 0.x command would prompt if there were no changed files, asking | ||
// if the user wanted to commit anyway. |
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.
@ari-gold What is the desired behavior if there is nothing to commit?
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.
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.
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.
@ari-gold done
str_replace( | ||
"\n", | ||
'', | ||
str_replace("\t", '', substr($log->get('message'), 0, 50)) |
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.
str_replace(array("\n", "\t"), '' ...)
could also work?
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.
Yeah maybe I just copied it from the old code... :) We're porting the 0.x commands to 1.0
514ae24
to
e2579e3
Compare
e2579e3
to
73869cb
Compare
@@ -31,7 +32,6 @@ public function deploy($site_env, $options = [ | |||
'cc' => false, | |||
'updatedb' => false,]) | |||
{ | |||
// @TODO: Switch this to the standard site.env input format? |
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.
@ronan I don't follow this comment - are you saying this is this not the standard site.env format?
73869cb
to
44de42b
Compare
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 messy str_replace that @aleszoulek would be worth tidying up, but this looks good!
* | ||
* @command env:code-log | ||
* | ||
* @param string $site_env Site & environment to show log for. |
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.
I've just noticed that there aren't any labels on the fields. Please add some. Here's the syntax for quick reference:
https://github.com/pantheon-systems/terminus/blob/master/src/Commands/Upstream/UpdatesListCommand.php#L20-L26
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.
Will do, thanks!
44de42b
to
2f4c31c
Compare
2f4c31c
to
253f665
Compare
253f665
to
9ecf529
Compare
No description provided.