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

Fixed Contribution Graph image URL #55

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chinma-yyy
Copy link
Contributor

Issue(s)

Closes #53

Acceptance Criteria fulfillment

  • Display Contribution graph during sharing the profile
  • Display the contribution graph in the chat after sharing the profile

Proposed changes (including videos or screenshots)

Before

1
3

After

Screenshot from 2023-02-22 00-00-08
Screenshot from 2023-02-22 00-00-39

@samad-yar-khan
Copy link
Collaborator

@chinma-yyy thanks for the contribution and pointing this out. But this makes the project dependent on another project which may go down any moment leaving us with a buggy interface. What do you think @henit-chobisa ?

@chinma-yyy
Copy link
Contributor Author

@chinma-yyy thanks for the contribution and pointing this out. But this makes the project dependent on another project which may go down any moment leaving us with a buggy interface. What do you think @henit-chobisa ?

Yes , @samad-yar-khan this was the original issue. Already in this File we were retrieving the graph from another project before but as it has been moved to another platform this issue was raised.Thank You.

@Nabhag8848
Copy link
Contributor

Nabhag8848 commented Mar 15, 2023

@chinma-yyy thanks for the contribution and pointing this out. But this makes the project dependent on another project which may go down any moment leaving us with a buggy interface. What do you think @henit-chobisa ?

  • ++1 @samad-yar-khan , I faced one similar issue in one of my project and did a trick. As the dependent project is MIT License we can publish that project in our cyclic account. Cyclic is free to use and anytime if that goes down we will have right and can manage to make it up again and we won't need to depend on them.

@samad-yar-khan
Copy link
Collaborator

samad-yar-khan commented Mar 25, 2023

@chinma-yyy thanks for the contribution and pointing this out. But this makes the project dependent on another project which may go down any moment leaving us with a buggy interface. What do you think @henit-chobisa ?

  • ++1 @samad-yar-khan , I faced one similar issue in one of my project and did a trick. As the dependent project is MIT License we can publish that project in our cyclic account. Cyclic is free to use and anytime if that goes down we will have right and can manage to make it up again and we won't need to depend on them.

@henit-chobisa Since you introduced this, would like your opinion on it.

@Nabhag8848
Copy link
Contributor

@chinma-yyy thanks for the contribution and pointing this out. But this makes the project dependent on another project which may go down any moment leaving us with a buggy interface. What do you think @henit-chobisa ?

  • ++1 @samad-yar-khan , I faced one similar issue in one of my project and did a trick. As the dependent project is MIT License we can publish that project in our cyclic account. Cyclic is free to use and anytime if that goes down we will have right and can manage to make it up again and we won't need to depend on them.

@henit-chobisa Since you introduced this, would like your opinion on it.

Also to Note: Most probably changing deployment from heroku to cyclic would due to the heroku made thier service completely paid.

@samad-yar-khan
Copy link
Collaborator

@chinma-yyy @Nabhag8848 Tested the PR. I believe the project that we are using to render this is well maintained. If the URL changes in the future, some contributor will sure open and issue or we can host ourselves.

Comment on lines 2 to 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
Collaborator

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 ?

Comment on lines 2 to 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
Collaborator

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

@chinma-yyy
Copy link
Contributor Author

@samad-yar-khan The pr ready

@Nabhag8848
Copy link
Contributor

Nabhag8848 commented Apr 7, 2023

@chinma-yyy @Nabhag8848 Tested the PR. I believe the project that we are using to render this is well maintained. If the URL changes in the future, some contributor will sure open and issue or we can host ourselves.

yep, @samad-yar-khan I believe we shouldn't host ourselves, Here is one Cons and Pros which i think we should note if we want to host ourselves:

Cons of Self-Hosting

  • We will need that repo forked + we will need to sync the changes from main branch to our forked-main branch as soon as we can, for syncing we can use actions too like auto-sync-your-fork which upstream the forked repo with repo.

Pros of Self-Hosting

  • We can have our own URL.

I see there are more Cons than Pros if we self-host also there would be more work around, We should avoid it if we can. cc @chinma-yyy

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.

Fix contribution graph image from /github me command
3 participants