-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to select DIFF_HEAD for changed files comparsion #38
base: master
Are you sure you want to change the base?
Conversation
33f6be9
to
d29161d
Compare
This solution works for me, but I removed this line. What is this for?
|
@richimf These configs are the options you can give to
|
Any chance we can get this merged soon? It's a pretty major improvement and a ticket has been open for this issue for a pretty long time now. |
See norio-nomura#38 which has stalled.
Any news? This update is an important issue @norio-nomura |
In case you don't already know, I had issues with this https://github.com/norio-nomura/action-swiftlint. @sinoru's version https://github.com/sinoru/actions-swiftlint solved most of them, and the code is clearly maintained. |
I don't see that it is clearly maintained, there are no pull requests, it is not nice to promote own fork in the original repo |
There's an issue report on #23. The
DIFF_BASE: ${{ github.base_ref }}
may not work in some cases, for example, the pull_request checking. The reason for that is: For the pull_request, theactions/checkout
will set the HEAD to therefs/remotes/pull/{PR_NUMBER}/merge,
but the${{ github.base_ref }}
isn't set. So we have to fetch the${{ github manually.base_ref }}
(usually the master). The original diff comparison only runs onFETCH_HEAD
and givenbase_ref.
But in this case, theFETCH_HEAD
will be thebase_ref
because we call thegit fetch.
Therefore, I set up a customizableHEAD
andBASE
parameters gives us more flexibility to deal with more jobs scenario, like the above case.And for the backward compatibility, I didn't remove the old implement to ensure the others won't break.