oncall-engine/engine/common
Joey Orlando 2576954b51
add shifts property to shift swap request response schema + finalize slack message layout (#2712)
# What this PR does

- drop `GET /api/internal/v1/shift_swaps/<id>/shifts` endpoint in favour
of adding a `shifts` property to the response schema for all shift swap
endpoints (expect `GET /api/internal/v1/shift_swaps` (ie. list all))
- Update the Slack message layout:

<img width="590" alt="Screenshot 2023-08-01 at 17 28 44"
src="https://github.com/grafana/oncall/assets/9406895/84a51614-5dd6-48ec-ae81-fef4bc32fec9">

**Note**: about the highlighted lines. This is a small issue w/ the
`ShiftSwapRequest.shifts` method. @matiasb is already helping out here 🙏

**Other stuff**
- adds some type hints related to the code I was working around with
- slightly refactor `apps.slack.utils.format_datetime_to_slack` to make
it more generic for the use case in this PR

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-08-01 14:21:02 -04:00
..
api_helpers add shifts property to shift swap request response schema + finalize slack message layout (#2712) 2023-08-01 14:21:02 -04:00
constants add several new database columns + emit two new Django signals (#1522) 2023-04-14 09:15:57 +02:00
custom_celery_tasks World, meet OnCall! 2022-06-03 08:09:47 -06:00
exceptions Send demo alert with dynamic payload and get demo payload example on private api (#1700) 2023-04-18 02:48:11 +00:00
insight_log Minor formatting changes (#2641) 2023-07-26 14:45:44 +01:00
jinja_templater Added preview and migration API endpoints for route migration from regex into jinja2 (#1715) 2023-04-18 02:53:53 +00:00
oncall_gateway Slack team connector v2 (#1581) 2023-03-28 03:27:45 +00:00
ordered_model Fix public API integration default route (#2573) 2023-07-18 20:29:04 +01:00
recaptcha Add validation of hostname for recapctha (#1445) 2023-03-06 08:59:48 +00:00
tests shift swap requests model + CRUD endpoints (#2597) 2023-07-21 19:35:19 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
admin.py continue addressing mypy violations (#2170) 2023-06-27 10:23:08 +00:00
database.py Fix Grafana teams sync (#1652) 2023-03-28 18:26:24 +00:00
l10n.py add user locale field to mobile app user settings table + change going on call push notification text (#2131) 2023-06-14 12:19:58 -04:00
public_primary_keys.py Insight logs (#348) 2022-08-24 12:04:44 +05:00
timezones.py shift swap requests model + CRUD endpoints (#2597) 2023-07-21 19:35:19 +00:00
utils.py Fix cuddled list Markdown issue (#2488) 2023-07-11 09:14:52 +00:00