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

Installer: add setter for HistoryChecker and VersionChecker. #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samuelchou
Copy link

@samuelchou samuelchou commented Feb 23, 2021

Gandalf is great, I really liked it! It provides the most features that my team-project needs.
However, I'd like to add a custom HistoryChecker setter (and VersionChecker btw) to make it more customizable.

Issue

In my case, our team hopes that the optional-update-window show up every time when user launches the app. However, the DefaultHistoryChecker has made the rule: when launched Gandalf, it will check the optional-update version last time saved in local preference, and if it is identical to the version this time, it will make GateKeeper.updateIsOptional returns false, causing Gandalf to not show up the window.

Proposal of Solution

After a little dig into the code, I think it is appropriate to add setter function in Gandalf.Installer, as most of other members has been allowed to re-set here, and HistoryChecker is designed as an interface. By adding this, I can implement my custom HistoryChecker, and hence solve the issue above.

I'm willing to discuss. If you have any thought or suggestion about this, please let me know :)

@samuelchou samuelchou changed the title Add setHistoryChecker and setVersionChecker function. Installer: add setter for HistoryChecker and VersionChecker. Feb 23, 2021
@samuelchou
Copy link
Author

samuelchou commented Feb 23, 2021

Actually, after re-think about it, I think a custom GateKeeper should be more match to my case...?
However, the changes will be a lot more if change GateKeeper from class to interface. And I wonder if it is necessary or useful in other cases...?

@samuelchou
Copy link
Author

And I don't really understand why Travis CI build failed. It says:

* What went wrong:
Execution failed for task ':gandalf:gnagReport'.
> Failed to fetch PR details. Reason: 401 Unauthorized

What could I do to fix it?

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.

1 participant