-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added possibility to ignore MagicMirror repo in updatenotification (#…
…3002) was [requested in the forum](https://forum.magicmirror.builders/topic/17519/updatenotification). - added possibility to exclude MagicMirror Repo and renamed it from `default` to `MagicMirror` - improved getting `behind` in case a hard `git fetch` was already done - removed test "excludes repo if refs don't match regex" because of above improvement this case is obsolete - improved `git fetch --dry-run` with `-n` option to exclude tags (noise reduction)
- Loading branch information
Showing
7 changed files
with
22 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ describe("Updatenotification", () => { | |
return { stdout: gitRevParseOut, stderr: gitRevParseErr }; | ||
} else if (command.includes("git status -sb")) { | ||
return { stdout: gitStatusOut, stderr: gitStatusErr }; | ||
} else if (command.includes("git fetch --dry-run")) { | ||
} else if (command.includes("git fetch -n --dry-run")) { | ||
return { stdout: gitFetchOut, stderr: gitFetchErr }; | ||
} else if (command.includes("git rev-list --ancestry-path --count")) { | ||
return { stdout: gitRevListOut, stderr: gitRevListErr }; | ||
|
@@ -71,8 +71,8 @@ describe("Updatenotification", () => { | |
jest.clearAllMocks(); | ||
}); | ||
|
||
describe("default", () => { | ||
const moduleName = "default"; | ||
describe("MagicMirror", () => { | ||
const moduleName = "MagicMirror"; | ||
|
||
beforeEach(async () => { | ||
gitRemoteOut = "origin\[email protected]:MichMich/MagicMirror.git (fetch)\norigin\[email protected]:MichMich/MagicMirror.git (push)\n"; | ||
|
@@ -108,13 +108,6 @@ describe("Updatenotification", () => { | |
const { error } = require("logger"); | ||
expect(error).toHaveBeenCalledWith(`Failed to retrieve repo info for ${moduleName}: Failed to retrieve status`); | ||
}); | ||
|
||
it("excludes repo if refs don't match regex", async () => { | ||
gitFetchErr = ""; | ||
|
||
const repos = await gitHelper.getRepos(); | ||
expect(repos.length).toBe(0); | ||
}); | ||
}); | ||
|
||
describe("custom module", () => { | ||
|