upptime / cli

⬆️🛠️ Upcoming CLI to power the new version of Upptime
MIT License
15 stars 8 forks source link

incidents file structure and helper functions #31

Closed jayantkatia closed 2 years ago

jayantkatia commented 2 years ago

TL;DR

Use provider specific workflows/actions to sync issue created as files. Write workflows/actions specific to the platform and use the platform agonist tool.

Benefits

  1. No dependency on a specific api
  2. Integrations with any platform will be a breeze.

Implementation

Issues created as files by the tool will be pushed to the remote repo(if specified), actions will trigger on changes made to issues/*/*.md and will generate issues on remote.
issues/slugified-name/an-issue.md will have yaml front matter which will contain meta fields. Comments will be separated using md-comments, example <!--start:comment:1--> COMMENT <!--end:comment:2-->.
Since, the template will require seldom PRs. We can sync issue-numbers by defining actions which will be triggered on any newly created PR, and will increase the offset in the root level incidents.yml.

Possible Pit-falls

Syncing issue-numbers would be difficult with some providers. GitHub, for example, has discussions in which discussion gets a id. We may define actions for every created discussion, but discussion-actions are not available yet (though, it is on their road-map).

Questions

  1. Should we really sync issue-numbers?
  2. Keeping in mind, the benefits and possible pit-falls, is it a good way to do things?