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

Change PagerDuty2 service-key to routing-key #3450

Merged
merged 8 commits into from
May 15, 2018

Conversation

jaredscheib
Copy link
Contributor

@jaredscheib jaredscheib commented May 14, 2018

Closes #2786

What was the problem?
PagerDuty v2's integration key is routing-key, not service-key.

What was the solution?
Create separate, dedicated PagerDuty2 config & handler components with the correct routing-key field name and UI copy.

  • Rebased/mergeable
  • Tests pass

@jaredscheib jaredscheib changed the title Fix/pagerdutyv2 servicekey Change PagerDuty2 service-key to routing-key May 14, 2018

private handleRoutingKeyRef = r => (this.routingKey = r)

private handleEnabledChange = (e: ChangeEvent<HTMLInputElement>) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider typing the return as void

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch. just copied all of this -- will type :)

this.disableTest()
}

private handleSubmit = async e => {
Copy link
Contributor

Choose a reason for hiding this comment

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

consider typing function signature

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

private handleSubmit = async e => {
e.preventDefault()

const properties = {
Copy link
Contributor

Choose a reason for hiding this comment

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

This would be type Properties

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

onGoToConfig,
validationError,
}) =>
selectedHandler.enabled ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider changing this to not use a ternary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

<span className="icon cog-thick" />
{validationError
? 'Exit this Rule and Edit Configuration'
: 'Save this Rule and Edit Configuration'}
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@ischolten ischolten left a comment

Choose a reason for hiding this comment

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

There are a few places that could be more typed and a place where a ternary is used. Other than that, looks good!

@jaredscheib jaredscheib merged commit 33263db into master May 15, 2018
@jaredscheib jaredscheib deleted the fix/pagerdutyv2_servicekey branch May 15, 2018 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants