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

feat(core): add history logic #541

Merged
merged 32 commits into from
Mar 11, 2024
Merged

feat(core): add history logic #541

merged 32 commits into from
Mar 11, 2024

Conversation

BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Mar 5, 2024

This PR is related to the history command and part of #216 and adds the history logic to core.

It includes the following logic:

  • prepareHashes - logic to get the commit hash from a list of logs
  • getHashes - logic to get a list of hashes based on options from, to, maxCount
  • history - the history logic that checks out all commits and runs collect and optionally upload

Testing:

  • Added unit tests and integration tests. For the integration tests I used a separate git folder to avoid the flaky test. I thing we should document that somewhere?

Copy link

nx-cloud bot commented Mar 5, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit dcd5ff9. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 9 targets

Sent with 💌 from NxCloud.

@BioPhoton BioPhoton marked this pull request as ready for review March 5, 2024 21:32
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.unit.test.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.unit.test.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@Tlacenka Tlacenka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has potential!

Thank you for the PR description 🙏

packages/core/src/lib/history.integration.test.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.unit.test.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.unit.test.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.unit.test.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.unit.test.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.integration.test.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.integration.test.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.integration.test.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.integration.test.ts Outdated Show resolved Hide resolved
BioPhoton and others added 17 commits March 7, 2024 19:48
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
# Conflicts:
#	packages/utils/src/index.ts
matejchalk
matejchalk previously approved these changes Mar 8, 2024
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.unit.test.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@Tlacenka Tlacenka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor suggestions, otherwise looking good!

packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.unit.test.ts Outdated Show resolved Hide resolved
packages/core/src/lib/history.unit.test.ts Outdated Show resolved Hide resolved
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
BioPhoton and others added 6 commits March 8, 2024 15:10
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
Co-authored-by: Katka Pilátová <katerina.pilatova@flowup.cz>
matejchalk
matejchalk previously approved these changes Mar 11, 2024
testing/test-utils/src/lib/utils/minimal-config.mock.ts Outdated Show resolved Hide resolved
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
@BioPhoton BioPhoton merged commit 10df94c into main Mar 11, 2024
18 checks passed
@BioPhoton BioPhoton deleted the add-history-logic-to-core branch March 11, 2024 18:57
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.

3 participants