ggshield icon indicating copy to clipboard operation
ggshield copied to clipboard

Improve action template

Open GG-HH opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Currently, the template for GitHub action requires the definition of external variables. This is a pain to me because my action templates are bigger than what's needed.

Describe the solution you'd like

It would be nice if the action did not require any environment variables definition by default.

Describe alternatives you've considered

Keep the current behavior.

Additional context

All those environment variables are defined from GitHub event payload. This payload should be accessible through the code because GitHub stores a JSON file containing the events (see GITHUB_EVENT_PATH env variable in this documentation)

Definition of Done

  • [ ] Our GitHub action code no longer requires our users to define GITHUB_PUSH_BEFORE_SHA, GITHUB_PUSH_BASE_SHA or GITHUB_DEFAULT_BRANCH;
  • [ ] For consistency, it would be good to read all variables from the .json file;
  • [ ] The action documentation has been updated accordingly. Note: this documentation update must only be published after the changes have been released!

GG-HH avatar Aug 11 '23 14:08 GG-HH