Skip to content
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

Dangerfile: Fixed how changed files are determined #2757

Merged

Conversation

RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Feb 12, 2021

I'm sure some of you noticed that the bundle size messages our bot procured sometimes contained files that were not changed in the current PR. This PR fixed that issue.

The cause of this problem was the git diff command. git diff simply returns a list of files that are different between two commits/branches. However, this is now what we want. The problem is that this did not account for commits added to master after the PR branch was branched off master. The solution is to find the proper merge base commit before diffing.

(I also moved up the function definition so it's closer to other git functions.)

@github-actions
Copy link

No JS Changes

Generated by 🚫 dangerJS against 830698b

@RunDevelopment RunDevelopment merged commit 0feb266 into PrismJS:master Feb 12, 2021
@RunDevelopment RunDevelopment deleted the danger-changed-files-fix branch February 12, 2021 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants