code-coverage-action icon indicating copy to clipboard operation
code-coverage-action copied to clipboard

Autodetect Pull requests from 'push' events

Open vitaliimelnychuk opened this issue 1 year ago • 3 comments

based on the work from https://github.com/barecheck/code-coverage-action/pull/293, there is a new parameter that was added to pass params as 'input'.

Ideally, we would like to include the logic and auto-detect Pull requests as part of the action to avoid writing complex docs how these params can be used.

vitaliimelnychuk avatar Dec 07 '24 15:12 vitaliimelnychuk

@vitaliimelnychuk, ⭐3 XP earned, 🏆First Issue Created completed, 💪Level 6 achieved! [Details]

icon

devactivity-app[bot] avatar Dec 07 '24 15:12 devactivity-app[bot]

barecheck/code-coverage-action Action is of type JS, which means we can't simply abstract away another Action for grabbing the PR number in a composite Action type.

The Action I have used for determining the pull request number is this

  • https://github.com/jwalton/gh-find-current-pr

It is also of type JS and has an MIT license. At a glance, it looks trivial to take the logic used by this Action and include it as part of barecheck/code-coverage-action.

garyburgmann avatar Dec 09 '24 23:12 garyburgmann

Hi @garyburgmann thanks for looking.

I was thinking the same that we could just add the logic as part of the barecheck/code-coverage-action.

It shouldn't be complicated to add something like we have here https://github.com/jwalton/gh-find-current-pr/blob/master/src/main.ts inside code-coverage-action and call this logic only for 'push' events. Let me know if you have any other thoughts on this.

This is quite common issue and a lot of workflows are built on top of 'push' events, so I am sure more people would benefit from this out of the box support of 'push' events.

vitaliimelnychuk avatar Dec 10 '24 14:12 vitaliimelnychuk