Skip to content

Commit

Permalink
Version 1.2.5 - Firefox release
Browse files Browse the repository at this point in the history
  • Loading branch information
NirmalScaria authored Nov 16, 2023
2 parents 4dd337a + acd4f0d commit e09a79e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
A browser extension that displays the git graph for any GitHub repository.

[![Version](https://img.shields.io/badge/License-MIT-yellow)]()
[![Version](https://img.shields.io/badge/Version-1.2.0-yellowgreen)]()
[![Version](https://img.shields.io/badge/Version-1.2.5-yellowgreen)]()
[![Version](https://img.shields.io/badge/Chrome_CI/CD-Success-green)]()
[![Version](https://img.shields.io/badge/Firefox_CI/CD-Success-green)]()

Expand Down
10 changes: 9 additions & 1 deletion html/commitItem.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,22 @@
<details
class="commit-build-statuses details-overlay details-reset js-dropdown-details hx_dropdown-fullscreen"
data-deferred-details-content-url="#" id="statusDetails">
<summary class="color-fg-success">
<summary class="color-fg-success commit-status-success">
<svg aria-label="1 / 1 checks OK" role="img" height="16" viewBox="0 0 16 16" version="1.1"
width="16" data-view-component="true" class="octicon octicon-check">
<path fill-rule="evenodd"
d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z">
</path>
</svg>
</summary>
<summary class="color-fg-danger commit-status-failure">
<svg aria-label="0 / 1 checks OK" role="img" height="16" viewBox="0 0 16 16" version="1.1"
width="16" data-view-component="true" class="octicon octicon-x">
<path
d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z">
</path>
</svg>
</summary>
<div class="dropdown-menu status-checks-dropdown dropdown-menu-e overflow-hidden">
<include-fragment class="m-4 d-flex flex-column flex-items-center">
<svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32"
Expand Down
2 changes: 1 addition & 1 deletion js/serviceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ try {
else if (details.reason == "update") {
// TODO: [URGENT] Remove this part with next version release.
// Else every version update will trigger an FRE.
freTab = await chrome.tabs.create({ url: "https://www.github.com/NirmalScaria/le-git-graph/?fre=true&reason=" + details.reason });
// freTab = await chrome.tabs.create({ url: "https://www.github.com/NirmalScaria/le-git-graph/?fre=true&reason=" + details.reason });
}
});
}
Expand Down
12 changes: 12 additions & 0 deletions js/showCommits.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ async function getCommitDetails(repoOwner, repoName, commits, allCommits) {
login
avatarUrl
}
},
statusCheckRollup {
state
}
}
}`;
Expand Down Expand Up @@ -118,6 +121,7 @@ async function getCommitDetails(repoOwner, repoName, commits, allCommits) {
commits[i].additions = commitDetails['commit' + i].additions;
commits[i].deletions = commitDetails['commit' + i].deletions;
commits[i].author = commitDetails['commit' + i].author.name;
commits[i].statusCheckRollup = commitDetails['commit' + i].statusCheckRollup?.state;
if (commitDetails['commit' + i].author.user != null) {
commits[i].authorAvatar = commitDetails['commit' + i].author.user.avatarUrl;
commits[i].authorLogin = commitDetails['commit' + i].author.user.login;
Expand All @@ -138,6 +142,7 @@ async function getCommitDetails(repoOwner, repoName, commits, allCommits) {
target.authorLogin = commit.authorLogin;
target.hasUserData = commit.hasUserData;
target.parents = commit.parents;
target.statusCheckRollup = commit.statusCheckRollup;
}
}
}
Expand Down Expand Up @@ -191,6 +196,13 @@ async function showCommits(commits, branchNames, allCommits, heads, pageNo, allB
newCommitItem.querySelector("#commitTreeLink").setAttribute("href", "/" + repoOwner + "/" + repoName + "/tree/" + commit.oid);
newCommitItem.querySelector("#commitLink").innerHTML = commit.oid.substring(0, 7);
newCommitItem.querySelector("#statusDetails").setAttribute("data-deferred-details-content-url", "/" + repoOwner + "/" + repoName + "/commit/" + commit.oid + "/status-details");
if (commit.statusCheckRollup == "SUCCESS") {
newCommitItem.querySelector("#statusDetails .commit-status-failure").remove();
} else if (commit.statusCheckRollup == "FAILURE") {
newCommitItem.querySelector("#statusDetails .commit-status-success").remove();
} else {
newCommitItem.querySelector("#statusDetails").remove();
}
newCommitItem.querySelector("#viewAllCommits").innerHTML = commit.authorLogin;
newCommitItem.querySelector("#relativeTime").innerText = relativeTime(commit.committedDate);
if (commit.hasUserData) {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.2.0",
"version": "1.2.5",
"name": "Le Git Graph - Commits Graph for GitHub",
"description": "A browser extension that displays the git graph for any GitHub repository.",
"manifest_version": 2,
Expand Down

0 comments on commit e09a79e

Please sign in to comment.