Skip to content

Releases: labrynx/auto_comments

v1.2.0

16 Feb 22:05
84fc993

Choose a tag to compare

What's Changed

Full Changelog: v1.1.3...v1.2.0

v1.1.3

16 Feb 15:01
acc7ae6

Choose a tag to compare

What's Changed?

The differences in the workflow configuration include the following changes:

  • Environment Variables Correction:
    The format of the environment variables has been changed from single quotes to double quotes.

  • Dependency Installation Improvements:
    The installation of jq and curl has been enhanced to ensure they are only installed if missing.

  • Enhanced Input Data Validation:
    More detailed error messages have been added for missing required variables.

  • Action Updates:
    The checkout action has been updated from v2 to v4, and a new step has been added to set up the Node.js environment using actions/setup-node@v3.

  • Project Type Detection:
    A new section has been added to detect the project type (Node.js, Yarn-based Node, Maven, Gradle, or Python) and configure the appropriate build, test, and lint commands.

  • Dependency Caching:
    New steps have been introduced to prepare and cache dependencies based on the detected project type.

  • Retry Function:
    A new retry_command function has been defined (in a generated retry.sh script) to reattempt build and test commands in case of transient failures.

  • Build, Test, and Coverage Enhancements:
    Logic has been added to retry the build and test commands, and a step has been included to check the coverage summary for Node-based projects.

  • Commit and PR Details Collection:
    Additional steps now gather commit information and PR details (including labels and changed files).

  • Improved PR Comment:
    The PR comment body has been enhanced to include detailed summaries for linting, tests, and coverage, providing a more comprehensive report.

  • Debug Logging:
    A debug logs section has been added that will run if the DEBUG variable is set to true, offering more insights during troubleshooting.

These updates improve the workflow's robustness and functionality, making it easier to detect the project type, manage dependencies, handle transient errors, and generate detailed and informative PR comments.

Full Changelog: v1.1.2...v1.1.3

v1.1.2

16 Feb 13:05
818f423

Choose a tag to compare

What's Changed

Full Changelog: v1.1.1...v1.1.2

v1.1.1

16 Feb 12:30
b2abfb0

Choose a tag to compare

What's Changed

  • Removed Introductory Note:
    The note suggesting the use of pull_request_target for forked pull requests has been removed.

  • Added Yarn Project Detection:
    The workflow now checks for a yarn.lock file. If found, it sets PROJECT_TYPE=node-yarn and updates the commands to use yarn install, yarn test, and yarn lint.

  • Introduced Dependency Caching:
    Two new steps have been added:

    • One step prepares a cache key using a defined CACHE_PATH and a DEPENDENCY_FILE (e.g., package-lock.json or pom.xml).
    • Another step uses actions/cache@v3 to cache the corresponding dependency directory.
  • Added Retry Logic for Build & Test Commands:
    A new shell script (retry.sh) is generated with a retry_command() function that attempts to run a command multiple times with a short delay between attempts, helping to recover from transient failures.

  • Expanded Coverage Reporting:
    For Node-based projects, the workflow now checks for a coverage/coverage-summary.json file and extracts a coverage percentage using jq. For Maven, Gradle, and Python projects, placeholder coverage messages are provided.

  • Stricter Lint Failure Handling:
    The lint step now runs under set -e, causing the workflow to fail immediately if linting errors occur, rather than simply continuing.

  • Updated Build & Test Behavior:
    The workflow now exits early if the project type is unknown, removing unnecessary placeholder outputs and preventing further steps from running.

  • Fixed Indentation in the Retry Script:
    The use of sed -E 's/^ {10}//' has been introduced to strip extra leading spaces from the generated retry.sh script, preventing syntax errors.

  • Improved Markdown Formatting:
    A blank line has been inserted after the <summary>Files Changed</summary> tag in the final PR comment, ensuring that file links render correctly in GitHub.

Full Changelog: v1.0.0...v1.1.1

v1.0.0

16 Feb 10:14
bf603d1

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/alessbarb/auto_comments/commits/v1.0.0