-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hi,
I'm thinking about a dataclass containing all the default variables like
from github_action_utils import vars
# vars.ci == True
# vars.github.event_path == '/github/workflow/event.json'
and so on. So every first _
in a variable name would actually open a new sub-level.
All values would be read-only. With appropriate __doc__
strings this would allow for great integration in any IDE.
The goal would be to reduce boilerplate code like
GITHUB = {
"SERVER_URL": github_action_utils.get_env("GITHUB_SERVER_URL"),
"REPOSITORY": github_action_utils.get_env("GITHUB_REPOSITORY"),
"RUN_NUMBER": github_action_utils.get_env("GITHUB_RUN_NUMBER"),
}
Opinions?
Metadata
Metadata
Assignees
Labels
No labels