POST_COMMANDS and reporters #5075
wesley-dean
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was thinking about the JSON reporter and how it could be fun to use it in combination with
jq
to fabricate JSON documents that could be passed along to APIs like the API reporter does, but in a less Grafana-specific way.I took a look at the "how does it work" on the FAQ page and I saw it didn't include in the process where
PRE_COMMANDS
orPOST_COMMANDS
would run, so I went to the source:https://github.com/oxsecurity/megalinter/blob/main/megalinter/Linter.py#L892-L899
(so, the answer is, after the linters but before the reporters)
So, it seems like the JSON reporter +
jq
+curl
(to send the results somewhere) through MegaLinter exclusively (i.e., not as a separate step in a GitHub Action, for example, is out). Unless there was aPOST_POST_COMMANDS
option, because the reporters (e.g., the JSON reporter) run after thePOST_COMMANDS
, there's no good, clean way to explore that concept.Is my understanding correct?
I'm thinking that if someone wanted to do something like that, they would use the JSON reporter to store the results, then use a separate step in a workflow to use
jq
,curl
, etc.. yeah?Beta Was this translation helpful? Give feedback.
All reactions