Simek / yarn-lock-changes

Creates a comment inside Pull Request with the human-readable summary of changes to the Yarn lock file. Works with every Yarn version (classic and berry).
https://github.com/marketplace/actions/yarn-lock-changes
MIT License
132 stars 20 forks source link

[Feature Request]: compare to pull request target branch and not repository.default_branch #27

Closed Bnaya closed 3 years ago

Simek commented 3 years ago

Hi @Bnaya, thank you for the feature request! 👍

Can you provide me a context for this request? I would like to understand the broader scope or missed use-case. Are you experiencing some issues? Link to to failed CI or steps to reproduce the problem would be helpful.

Bnaya commented 3 years ago

Hey @Simek ! Thank you for your response! So what we have is a "temporary main branch" that we pull request to it and eventually we will merge it to main When PRing yarn.lock changes to the "temporary main branch" the changes report is computed against the original main and not the "temporary main branch" which is very confusing

Simek commented 3 years ago

Thank you for the quick response! 🙂

Will introducing the new config option like defaultBranch or mainBranch which, when specified, will overwrite the default_branch name from the PR payload be sufficient to fix your issue?

Bnaya commented 3 years ago

What about using the base_ref from the event? https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#:~:text=github.base_ref

Simek commented 3 years ago

I'm accessing action context via context exported by hydrated GitHub Octokit client (https://github.com/actions/toolkit/tree/main/packages/github) which structure differs from the docs you are referring to, but I will look at that. Thank you for the hint! 🙏

Simek commented 3 years ago

The issue has been closed automatically on the PR merge but feel free to reopen it, if the change in PR won't solve your issue.

If you are using main as a version of action in the workflow file, you should see the change with the next job run. 😉