-
Notifications
You must be signed in to change notification settings - Fork 2
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
Poll for Git repository hash and set isOutdated
when it changes
#31
Poll for Git repository hash and set isOutdated
when it changes
#31
Conversation
AP-3369 Add concept of outdated builds
To get a hash of staged+unstaged+untracked changes:
This seems to be the only way to get a full hash of all these types of changes, whilst excluding any deleted files (which would cause an error because they can't be hashed). |
isOutdated
when it changesisOutdated
when it changes
a13e30d
to
d0267bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
Can we move the gitStateHash
code to the CLI and pull it from there? I already do that (for the other git info) in this PR: https://github.com/chromaui/addon-visual-tests/pull/26/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! This looks like it includes some fixes for other issues too, make sure you close them too if so!
This generates a single hash representing the current state of the Git repository, and sends a channel event whenever the hash changes. The panel sets
isOutdated: true
whenever it receives the event.There are a bunch more improvements on this PR, including a fix to how the Tool and Panel synchronize state, how/when the "run tests" button shows a spinner/is disabled, a fix to prevent the UI from flickering while polling, and a tweak to never stop polling for build/tests.
📦 Published PR as canary version:
0.0.22--canary.31.f264f7e.0
✨ Test out this PR locally via:
npm install @chromaui/addon-visual-tests@0.0.22--canary.31.f264f7e.0 # or yarn add @chromaui/addon-visual-tests@0.0.22--canary.31.f264f7e.0