Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion github/helpers/githubActivityGraphURL.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

export function githubActivityGraphUrl(username : string): string {
return `https://activity-graph.herokuapp.com/graph?username=${username}&bg_color=ffffff&color=708090&line=24292e&point=24292e`
return `https://github-readme-activity-graph.cyclic.app/graph?username=${username}&bg_color=ffffff&color=708090&line=24292e&point=24292e&area=true&hide_border=true`
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chinma-yyy Can you please add a comment, linking the project that we are using for this so this remains documented incase they change the URL ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chinma-yyy can we do something like this to make the params more readable or I am sure you can come with a neater way which can append the params. Would improve readability.


    let base_url = new URL("https://github-readme-activity-graph.cyclic.app/graph");

    base_url.searchParams.append('user_name',username);
    base_url.searchParams.append('bg_color','ffffff');
    base_url.searchParams.append('color','708090');
    base_url.searchParams.append('line','24292e');
    base_url.searchParams.append('area','true');
    base_url.searchParams.append('hide_border','true');
    base_url.searchParams.append('&point','24292e');
    
    return base_url.toString()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sure