Skip to content
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

fix(notifications): Fixing custom message text shape #7349

Merged
merged 2 commits into from
Aug 20, 2019

Conversation

alanmquach
Copy link
Contributor

Echo expects the custom message structure to be:

message: {
  "pipeline.starting": {
    text: 'foo'
  }
}

So we have to set the path to be message["pipeline.starting"].text instead of message.pipeline.starting.text, which would result in:

message: {
  pipeline: {
    starting: {
      text: 'foo'
    }
  }
}

@@ -57,7 +57,7 @@ export class NotificationDetails extends React.Component<INotificationDetailsPro
if (whenOption !== 'manualJudgment' && ['email', 'slack', 'googlechat'].includes(type)) {
return (
<FormikFormField
name={'message.' + whenOption + '.text'}
name={'message["' + whenOption + '"].text'}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this may read a little more easily with a template string:

{`message["${whenOption}"].text`}

@alanmquach alanmquach merged commit a7896bf into spinnaker:master Aug 20, 2019
@alanmquach alanmquach deleted the pipeline-notifications branch August 20, 2019 22:30
alanmquach added a commit to alanmquach/deck that referenced this pull request Aug 20, 2019
a7896bf fix(notifications): Fixing custom message text shape (spinnaker#7349)
8bdca89  fix(core): fix vertical alignment of radio buttons (spinnaker#7344)
d00f2a4 fix(artifacts): set the artifacts on trigger before the pipeline to sync problems with Angular (spinnaker#7345)
b6ea1de fix(core): fix produces artifacts UI (spinnaker#7343)
9812469 feat(bakeManifest): add kustomize support (spinnaker#7342)
alanmquach added a commit that referenced this pull request Aug 20, 2019
a7896bf fix(notifications): Fixing custom message text shape (#7349)
8bdca89  fix(core): fix vertical alignment of radio buttons (#7344)
d00f2a4 fix(artifacts): set the artifacts on trigger before the pipeline to sync problems with Angular (#7345)
b6ea1de fix(core): fix produces artifacts UI (#7343)
9812469 feat(bakeManifest): add kustomize support (#7342)
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
a7896bf fix(notifications): Fixing custom message text shape (spinnaker#7349)
8bdca89  fix(core): fix vertical alignment of radio buttons (spinnaker#7344)
d00f2a4 fix(artifacts): set the artifacts on trigger before the pipeline to sync problems with Angular (spinnaker#7345)
b6ea1de fix(core): fix produces artifacts UI (spinnaker#7343)
9812469 feat(bakeManifest): add kustomize support (spinnaker#7342)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants