Replies: 4 comments 9 replies
-
maybe a stdout_template: |
Changes on:
{{#sites}}
- {{.}}
{{/sites}}
Diff:
{{#commit}}
https://github.com/bla/commit/{{.}}
{{/commit}}
sites:
- … which could then be used in these cases:
The notification logic could be removed and integrated via other tools which are better suited for their jobs. Outputting json might still be more helpful in some use cases. Maybe output a default / custom |
Beta Was this translation helpful? Give feedback.
-
Currently, my leading thought for that is JSON on stdout and when the GitHub Actions environment is detected, JSON to GHA_OUTPUT. The notification feature would print a deprecation warning linking to this GitHub discussion or a dedicated issue / discussion. On a later release its fully removed. What would be needed to simplify the migration from notifications to the simpler JSON output? What would you require on the JSON output to be easy to use? |
Beta Was this translation helpful? Give feedback.
-
The JSON summary seems like another bunch of complexity which will be hard to deprecate and migrate properly. Which sparks the thought: what is actually needed. Currently I only know of Telegram being used for notifications. Notification Text could be hardcoded (human) language independent. No need to have that customisable. The only thing that comes to my mind is the Commit URL that is added in my notification template. website-stalker could parse My pling library currently used for notifications provides more than just Telegram and more than just reqwest. Stuff like Slack can be done with the same dependencies, throw out the rest like email which adds a huge bunch of dependencies which aren’t used by anyone. Another downside of pling is the bad discoverability. Provide a clap derive feature and include this in the —-help. Also solvable. I think this solves a lot of problems: less complexity and less dependencies while the stuff that is actually wanted (Telegram notifications) still works. |
Beta Was this translation helpful? Give feedback.
-
#200 is the way going forward for this. |
Beta Was this translation helpful? Give feedback.
-
It might also be neat to rethink some things of the current website-stalker. It bundles multiple things which are annoying to use separately then.
Currently it does the web requests, the editors to adapt the content, the git integration and the notification integration.
Something like this would be neat but is not possible currently:
This would remove a bunch of dependencies and allow for easier combination with other use cases.
This mini example also already shows some downsides: there could only be one output so having a commit text and some human friendly notification text will probably differ. Maybe output stuff as JSON. Tools like
jq
can then be used to get whats needed.Combining info into readable texts could be done with mustache like it is done currently already.
Another benefit of splitting things up would be a library usage of website-stalker to be used in other projects.
The biggest downside is simplicity of usage. Currently the executable can be run with a single command and then everything works.
Maybe keeping flags like
--commit
would be a good idea while simplifying its logic. Maybe let it just use the local git executable withgit add -A && git commit --author foo --message bar
and remove all the magic git assumptions.Beta Was this translation helpful? Give feedback.
All reactions