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

Improve new commit check and fix 'first sync' shallow issue #38

Merged
merged 9 commits into from
Nov 26, 2021

Conversation

aormsby
Copy link
Owner

@aormsby aormsby commented Oct 31, 2021

Fix based on issue #36

Previously, the action checked for new commits rather naively by comparing the heads of the target and upstream branches and looking for a difference. However, that didn't account for the situation where the target branch has new commits unrelated to syncing.

Now, the action loops through all of the commit hashes since the last sync (actually, going back to the shallow_since time), and does a more thorough check to see if a new sync is needed or not.

  • shallow_since was added with default 1 month ago
  • An unshallow operation was added to deal with 'first sync' situations
  • Commit log output was improved

@aormsby aormsby merged commit 8bfb7e7 into main Nov 26, 2021
@aormsby aormsby deleted the check-fix-2 branch November 26, 2021 02:19
@aormsby aormsby mentioned this pull request Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant