Where the changes of the inbox come from: a file of the app, a folder of
files, a service. A source is a module with changes/1, named in the
:sources of the :inbox config with its options:
inbox: [
sources: [
{Tayori.Sources.Changelog, path: {:my_app, "priv/CHANGELOG.md"}},
{Tayori.Sources.Fragments, path: {:my_app, "priv/news"}},
{MyApp.ReleaseNotes, url: "https://..."}
]
]Tayori reads them when the app starts (:ingest_on_start) and when
Tayori.Inbox.ingest/0 is called. A change a source gives again, with
the same :ref, is not added twice, so a source gives all it has each
time.
Tayori has two: Tayori.Sources.Changelog (a Keep a Changelog file)
and Tayori.Sources.Fragments (a folder of Markdown files, as
Changesets and towncrier write them).
Summary
Types
A change as a source gives it: the attributes of Tayori.Change, with
string or atom keys. :ref and :title are needed.
Callbacks
The changes the source has now, all of them.
The name of the source, for Tayori.Change's :source (the module's last part, lowercased).
Functions
The path of a source's file or folder: an absolute path; a path
relative to the current directory; or {otp_app, path}, relative to
the app's directory (Application.app_dir/2), which is where a release
keeps priv/.
Types
@type change() :: map()
A change as a source gives it: the attributes of Tayori.Change, with
string or atom keys. :ref and :title are needed.
Callbacks
Functions
The path of a source's file or folder: an absolute path; a path
relative to the current directory; or {otp_app, path}, relative to
the app's directory (Application.app_dir/2), which is where a release
keeps priv/.