saadmk11 / github-action-utils Goto Github PK
View Code? Open in Web Editor NEWCollection of python functions that can be used to run GitHub Action Workflow Commands
Home Page: https://pypi.org/project/github-action-utils/
License: MIT License
Collection of python functions that can be used to run GitHub Action Workflow Commands
Home Page: https://pypi.org/project/github-action-utils/
License: MIT License
github-action-utils/github_action_utils.py
Line 140 in 90a1f98
Misplaced call to .encode()
method leading to unusable output.
Issue in Changlog client
saadmk11/changelog-ci#94
Thank you for these utils!
I see that ::set-output
is still used:
https://github.com/saadmk11/github-action-utils/blob/main/github_action_utils.py#L152
More info about the deprecation and the solution here:
If you fix this and publish a new release, I will be glad to start using this library!
If I'm developing a script that runs either locally or in github action, I may want to detect whether it is running in github action environment, because some functions in github-action-utils is unusable locally.
Although I can detect the environment by using try-catch, I still want a more Pythonic solution in the github-action-utils module. For example, a is_github_action()
function that returns a bool.
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?
You need a py.typed
file to indicate to pyright and other type checkers that the library is typed: https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface
Also, an __all__
would be very nice, even if this is a single module package!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.