Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion github/handlers/ExecuteBlockActionHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { IssueDisplayModal } from "../modals/IssueDisplayModal";
import { IGitHubIssue } from "../definitions/githubIssue";
import { BodyMarkdownRenderer } from "../processors/bodyMarkdowmRenderer";
import { CreateIssueStatsBar } from "../lib/CreateIssueStatsBar";
import { githubActivityGraphUrl } from "../helpers/githubActivityGraphURL";

export class ExecuteBlockActionHandler {

Expand Down Expand Up @@ -331,7 +332,7 @@ export class ExecuteBlockActionHandler {
})

if (profileShareParams.includes('contributionGraph')){
block.addImageBlock({imageUrl : `https://activity-graph.herokuapp.com/graph?username=${userProfile.username}&bg_color=ffffff&color=708090&line=24292e&point=24292e`, altText: "Github Contribution Graph"})
block.addImageBlock({imageUrl : githubActivityGraphUrl(userProfile.username), altText: "Github Contribution Graph"})
}


Expand Down
19 changes: 17 additions & 2 deletions github/helpers/githubActivityGraphURL.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
export function githubActivityGraphUrl(username: string): string {
/*
We are using this project as a dependent project to generate our contribution graph image
for our GitHub profile! https://github-readme-activity-graph.cyclic.app/graph
The project can be found at :- https://github.com/Ashutosh00710/github-readme-activity-graph
*/
const baseUrl = "https://github-readme-activity-graph.cyclic.app/graph";
let url = new URL(baseUrl);

export function githubActivityGraphUrl(username : string): string {
return `https://activity-graph.herokuapp.com/graph?username=${username}&bg_color=ffffff&color=708090&line=24292e&point=24292e`
url.searchParams.append("user_name", username);
url.searchParams.append("bg_color", "ffffff");
url.searchParams.append("color", "708090");
url.searchParams.append("line", "24292e");
url.searchParams.append("area", "true");
url.searchParams.append("hide_border", "true");
url.searchParams.append("&point", "24292e");

return url.toString();
}