Commit Graph

11552 Commits

Author SHA1 Message Date
Alec Jacobs 75813194a6 chore(plugins/pagerduty): regenerate api-report
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-17 17:02:15 -07:00
Alec Jacobs a9b6b729c4 feat(plugins/pagerduty): refactor PagerDutyClient.getServiceByEntity
* provide raw backstage entity

Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-17 17:02:15 -07:00
Alec Jacobs fb9b81780a feat(plugins/pagerduty): use getPagerDutyEntity helper in hook
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-17 17:02:15 -07:00
Alec Jacobs ce89b1801e feat(plugins/pagerduty): add pagerDutyEntity helper
* parse a PagerDutyEntity from a Backstage Entity

Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-17 17:02:15 -07:00
Alec Jacobs 7889629264 fix(plugins/pagerduty): properly type optional variable
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-17 17:02:15 -07:00
Alec Jacobs 8ac5b73da2 feat(plugins/pagerduty): prefix exported types with PagerDuty
* generate api-report.md
* ensure generic exported types are prefixed with PagerDuty for ease of
  import by consumers

Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-17 17:02:15 -07:00
Alec Jacobs f22f6050b4 feat(plugins/pagerduty): ensure proper types are exported and regenerate api-report
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 0be087f637 fix(plugins/pagerduty): define responses types before utilizing them
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 48a7d96e72 feat(plugins/pagerduty): update getOnCallByPolicyId response to be Promise<OnCallsResponse>
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 7378e1710c feat(plugins/pagerduty): update getChangeEventsByServiceId response to be Promise<ChangeEventsResponse>
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 206fc1f601 feat(plugins/pagerduty): update getIncidentsByServiceId response to be Promise<IncidentsResponse>
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 9b8438fd72 feat(plugins/pagerduty): remove unused getServiceByIntegrationKey
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 8fe1113c96 feat(plugins/pagerduty): remove unused getServiceByServiceId
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 71cc97f207 feat(plugins/pagerduty): refactor to use PagerDutyClient.getServiceByEntity
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 4d755224cc feat(plugins/pagerduty): add getServiceByEntity client function
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 05da90db84 feat(plugins/pagerduty): enforce PagerDutyEntity type from usePagerdutyEntity
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 1b0ab05757 feat(plugins/pagerduty): add PagerDutyEntity type
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 89f596bb4a feat(plugins/pagerduty): refactor PagerDutyClient.fromConfig to accept second argument of ClientApiDependencies
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 67bfd75de1 feat(plugins/pagerduty): add ClientApiDependencies type
* have ClientApiConfig join ClientApiDependencies with custom
  configuration

Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 56926b6f1e chore(plugins/pagerduty): move mockPagerDutyApi to not reference const before it is defined
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs d8abae2ce6 chore(plugins/pagerduty): dont shadow outer variable
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs aba92d8f6a fix(plugins/pagerduty): use NotFoundError from @backstage/errors
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs f13bf8b510 feat(plugins/pagerduty): add @backstage/errors package
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 946c11ad03 docs(plugins/pagerduty): update README for new annotation support
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 8901c1d285 docs(plugins/pagerduty): regenerate api-report
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 707191bf6f feat(plugins/pagerduty): lookup by service-id if that is available
* prefer integration-key value over service-id
* disable creation of incidents if integration-key is not available

Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 02c2978b79 feat(plugins/pagerduty): handle empty response when querying services
* raise NotFoundError in async hook
* show ServiceNotFoundError empty state when async hook errors

Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs bb4fb80dac feat(plugins/pagerduty): add wrapper BasicCard component
* ensures errors and progress bar have consistent styling with the rest
  of the Overview Page components

Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 3cf02b6e9c feat(plugins/pagerduty): handle 404 error code in Api Client
* raise NotFoundError

Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:47 -07:00
Alec Jacobs 845c7f8852 feat(plugins/pagerduty): add NotFoundError
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:46 -07:00
Alec Jacobs 525641fc02 feat(plugins/pagerduty): add ServiceNotFoundError empty state
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:46 -07:00
Alec Jacobs ff30bc3f06 fix(plugins/pagerduty): use FetchApi over raw fetch with IdentityApi
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:46 -07:00
Alec Jacobs e5af087fb5 feat(plugins/pagerduty): add getServiceByServiceId to PagerDutyClient
* extract common params to helper constant

Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:46 -07:00
Alec Jacobs 7959a35cc1 feat(plugins/pagerduty): check for service id annotation for applicable entities
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:46 -07:00
Alec Jacobs 0e8fc43492 feat(plugins/pagerduty): add serviceId to pager duty entity
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:46 -07:00
Alec Jacobs 7fdb8eb4fc feat(plugins/pagerduty): add constant for service id annotation
annotation: 'pagerduty.com/service-id'
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
2022-06-15 08:07:46 -07:00
Patrik Oldsberg 72e5059ef9 Merge pull request #12041 from Bonial-International-GmbH/pjungermann/catalog-import
fix: check for `integrations.github` without retrieving `integrations`
2022-06-15 15:10:01 +02:00
Patrik Oldsberg a1c4f243e3 Merge pull request #11769 from AvaliaSystems/bf-entity-context-menu-style
Bf entity context menu style
2022-06-15 15:07:54 +02:00
Patrick Jungermann 272106fdad fix: check for integrations.github without retrieving integrations
Support use without `integrations` or only integrations without frontend visible properties
(e.g., `bitbucketCloud`) being configured by checking `integrations.github` directly
without attempting to load `integrations`.

Previously, `integrations` was retrieved first and then the existence of the
key `github` was checked.

This could fail if there was no config below `integrations` which has `@visibility frontend`.

This happened if no integration or only non-Github integrations without
frontend visible properties like `integrations.bitbucketCloud` are used.

After this change, we will check `integrations.github` directly.

Closes: #11700
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
2022-06-15 13:17:58 +02:00
Ben Lambert 7e652f2a17 Merge pull request #12022 from backstage/jhaals/mdx
chore: Make docstrings MDX compatible
2022-06-15 09:33:49 +02:00
Johan Haals d91bdd0e4d Merge pull request #12005 from gregorytalita/fix/github-open-pull-requests-board
fix: removed unnecessary filter on spec.type at Github Open Pull Requests Board plugin
2022-06-15 09:33:17 +02:00
Johan Haals c3cfc83af2 chore: Make docstrings MDX compatible
Signed-off-by: Johan Haals <johan.haals@gmail.com>
2022-06-14 16:29:17 +02:00
Olivier Liechti 11a4d9157c Generate new api-report.md
Signed-off-by: Olivier Liechti <olivier.liechti@wasabi-tech.com>
2022-06-14 15:33:45 +02:00
Olivier Liechti 066626f166 Fix export
Signed-off-by: Olivier Liechti <olivier.liechti@wasabi-tech.com>
2022-06-14 15:16:38 +02:00
Fredrik Adelöw 217f919f0a Minor cleanup in gh actions - do not unpack in the signature
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2022-06-14 14:21:42 +02:00
github-actions[bot] 2e2a82c9d7 Version Packages 2022-06-14 09:12:05 +00:00
Olivier Liechti e173877d51 Fix typo in changeset
Signed-off-by: Olivier Liechti <olivier.liechti@wasabi-tech.com>
2022-06-14 10:23:06 +02:00
Olivier Liechti 74dc3acb1a Fix typo in changeset
Signed-off-by: Olivier Liechti <olivier.liechti@wasabi-tech.com>
2022-06-14 10:23:06 +02:00
Olivier Liechti 33ad22a309 Update api-report.md
Signed-off-by: Olivier Liechti <olivier.liechti@wasabi-tech.com>
2022-06-14 10:23:06 +02:00
Olivier Liechti ae8c6bf162 Fix linter issue
Signed-off-by: Olivier Liechti <olivier.liechti@wasabi-tech.com>
2022-06-14 10:23:06 +02:00