Embed build metadata in the generated dotslash file

#2 · closed · 2 comments

View on GitHub ↗

bigfootjon

In the Meta-internal version of dotslash we have a header with some valuable information: the source file used to generate the dotslash file and the CI job that actually generated the file. Meta employees can see an example of this header here: https://fburl.com/code/l0euqzmy Would this be something we could consider adding to this action? All relevant information could be derived without any input from users. Another related feature request is arbitrary extra metadata, though I don't have a concrete need for it at this time. Ref https://github.com/facebook/buck2/pull/565 for the inspiration behind this feature request

Comments

bolinfest

My general feeling is that, for maximum flexibility, either the action or the config.json you specify should let you specify a path to a Python script or something that takes the JSON that is going to be written to the DotSlash file and then can rewrite it however it likes and spits the "new" JSON back to stdout. Though I'm not sure if there is other information beyond the JSON that would need to be passed in to such a script, such as the current commit, etc. Some of this should already be available via the various `GITHUB_` environment variables, though?

bigfootjon

I'm fine with an arbitrary script *as well*, but IMO having more information embedded in the file by default is sensible