v0.0.34 - Convert to classes (#336)
๐ Summary
The v0.0.34 release brings a major refactor to GitHub Actions utilities by transitioning API logic to a new Action
class, streamlining event handling, and simplifying code maintainability while enforcing standardized linting and formatting configurations.
๐ Key Changes
-
๐๏ธ Transition to
Action
Class- Replaced usage of hardcoded GitHub environment variables with an
Action
class for handling API calls and event data. - Centralized logic for GitHub interactions, such as fetching PR diffs, updating metadata, and executing GraphQL queries.
- Replaced usage of hardcoded GitHub environment variables with an
-
๐ Enhanced Modularization
- Refactored repository, labeling, and discussion APIs into encapsulated, reusable methods within the
Action
class. - Unified headers and API interaction logic for a more streamlined approach to event processing.
- Refactored repository, labeling, and discussion APIs into encapsulated, reusable methods within the
-
โจ Improved Formatting and Linting
- Added Ruff for Python linting with a 120-character line limit.
- Integrated
docformatter
to ensure consistent docstring wrapping and formatting across the codebase.
-
๐งน Code Cleanup
- Removed unused variables and simplified GraphQL queries, reducing clutter while improving clarity.
- Reorganized exports (
__all__
) to include only relevant functions.
๐ฏ Purpose & Impact
Purpose:
- Simplify Development: By encapsulating logic in the
Action
class, developers now have a cleaner, modular codebase thatโs easier to maintain. - Enhance Standards: Enforced consistent formatting and linting ensures code is readable, professional, and easy to collaborate on.
Impact:
- Streamline Operations: Key GitHub workflows such as auto-labeling and issue triaging are now more efficient.
- Reduced Technical Debt: Refactoring helps future-proof the repository by removing redundancies and improving extensibility.
- Better Collaboration: Formatting and modularization simplify contributions by creating a shared standard for all contributors.
This release empowers developers to interact with GitHub Actions more intuitively while benefiting from improved code quality and maintenance practices. ๐
What's Changed
- Update first_interaction.py by @glenn-jocher in #334
- Cleanup by @glenn-jocher in #335
- Update pyproject.toml by @glenn-jocher in #337
- Convert to classes by @glenn-jocher in #336
Full Changelog: v0.0.33...v0.0.34