From be4409efc1d8df629219b84d1303796e9a7d4a1e Mon Sep 17 00:00:00 2001 From: Misha Kav Date: Tue, 13 Feb 2024 08:23:39 +0200 Subject: [PATCH 1/3] 1.1.51 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index cf3a47c..2b38fce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pytest-coverage-comment", - "version": "1.1.50", + "version": "1.1.51", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "pytest-coverage-comment", - "version": "1.1.50", + "version": "1.1.51", "license": "MIT", "dependencies": { "@actions/core": "^1.10.1", diff --git a/package.json b/package.json index c51870b..c0cafce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pytest-coverage-comment", - "version": "1.1.50", + "version": "1.1.51", "description": "Comments a pull request with the pytest code coverage badge, full report and tests summary", "author": "Misha Kav", "license": "MIT", From 1f37e79bc2b279d0b2d21c7590d2c95739e8ea06 Mon Sep 17 00:00:00 2001 From: Misha Kav Date: Tue, 13 Feb 2024 08:29:36 +0200 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c7191f..7a8ed86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog of the Pytest Coverage Comment +## [Pytest Coverage Comment 1.1.51](https://github.com/MishaKav/pytest-coverage-comment/tree/v1.1.51) + +**Release Date:** 2024-01-13 + +#### Changes + +- add `workflow_run` to the events that can trigger this action, big thanks to [@Bouni](https://github.com/Bouni) for contribution + ## [Pytest Coverage Comment 1.1.50](https://github.com/MishaKav/pytest-coverage-comment/tree/v1.1.50) **Release Date:** 2023-11-26 From e1069dbe62fed09da424e77b7cbe57e46d14bc71 Mon Sep 17 00:00:00 2001 From: Misha Kav Date: Tue, 13 Feb 2024 08:30:55 +0200 Subject: [PATCH 3/3] build --- dist/index.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 4f3ca55..77aef4a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -17928,7 +17928,10 @@ const main = async () => { } else if (eventName === 'push') { options.commit = payload.after; options.head = context.ref; - } else if (eventName === 'workflow_dispatch' || eventName === 'workflow_run') { + } else if ( + eventName === 'workflow_dispatch' || + eventName === 'workflow_run' + ) { options.commit = context.sha; options.head = context.ref; } @@ -17983,7 +17986,8 @@ const main = async () => { if ( !options.hideReport && html.length + summaryReport.length > MAX_COMMENT_LENGTH && - (eventName != 'workflow_dispatch' && eventName != 'workflow_run') + eventName != 'workflow_dispatch' && + eventName != 'workflow_run' ) { // generate new html without report // prettier-ignore @@ -18067,7 +18071,10 @@ const main = async () => { WATERMARK, ); } - } else if (eventName === 'workflow_dispatch' || eventName === 'workflow_run') { + } else if ( + eventName === 'workflow_dispatch' || + eventName === 'workflow_run' + ) { await core.summary.addRaw(body, true).write(); if (!issueNumberInput) { // prettier-ignore @@ -18166,7 +18173,7 @@ const getChangedFiles = async (options, pr_number) => { if (response.status !== 200) { core.setFailed( `The GitHub API for comparing the base and head commits for this ${eventName} event returned ${response.status}, expected 200. ` + - "Please submit an issue on this action's GitHub repo.", + "Please submit an issue on this action's GitHub repo.", ); }