yoshi389111 / github-profile-3d-contrib Goto Github PK
View Code? Open in Web Editor NEWThis GitHub Action creates a GitHub contribution calendar on a 3D profile image.
License: MIT License
This GitHub Action creates a GitHub contribution calendar on a 3D profile image.
License: MIT License
Describe the bug
When running GitHub Actions with the generate-github-profile-3d-contrib
workflow, there is a deprecation warning indicating that Node.js 16 actions are deprecated. The recommendation is to update to Node.js 20. The specific actions mentioned in the warning are actions/checkout@v3
and yoshi389111/[email protected]
.
To Reproduce
Steps to reproduce the behavior:
actions/checkout@v3
and yoshi389111/[email protected]
.Expected behavior
The GitHub Actions workflow should run without deprecation warnings. Updating the underlying Node.js version used by the actions to Node.js 20 is expected to resolve the warning.
Desktop (please complete the following information):
Describe the bug
Height of days with more than 50 contributions is always 153.
const calHeight = Math.min(50, cal.contributionCount) * 3 + 3;
https://github.com/formidablae/github-profile-3d-contrib/blob/210fbaf3147b61d63405df0a043af830a252bfe5/src/create-3d-contrib.ts#L219
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Days with different contributions should have different heights.
Days with more contributions should have taller bars than days with fewer contributions.
Days with same number of contributions (in the last 365 days) should have same height of the bar.
Screenshots
Is now:
even though those days have different contribution numbers.
A possibile solution
Since some users might have days with hundreds of contributions and other days with very few - therefore the bar height difference would be huge and not nice to show linearly, I propose the usage of logarithmic height for the bars. ( in the form of height = log(num_contribs * constant_a + constant_b)
.
constant_b
helps keep decent the height of days with a small number of contributions. When a users starts having more and more contribs, constant_b
starts having less influence on the height.
Example (number of contributions -> corresponding height):
1 contribution -> log(1 contrib * 5 + 10) = log(15) = 1.18
2 contribs -> log(2 * 5 + 10) = 1.3
5 contribs -> log(35) = 1.54
10 contribs -> log(60) = 1.78 (going from 1 contribs to 10, increases height by 0.6, +50%)
20 contribs -> log(110) = 2.04
50 contribs -> log(260) = 2.41
100 contribs -> log(510) = 2.71 (going from 10 contribs to 100, increases height by 0.93, +52%)
200 contribs -> log(1010) = 3.00
500 contribs -> log(2510) = 3.40
1000 contribs -> log(5010) = 3.70 (going from 100 contribs to 1000, increases height by 0.99, +37%)
10000 contribs -> log(50010) = 4.70 (going from 100 contribs to 1000, increases height by 1, +27%)
For each order of 10 increase, there would be approximately an increase in height of 1 with relative percentage increase continually decreasing.
This way infinity isn't avoided but height difference between days is preserved and visually it might be nice(r) (play with the constants for a better result - maybe add some other constant related to the average of contributions in the last 365 days).
Describe the bug
I am not sure if it is indeed a bug, I believe it might be a mistake on my part, I hope you can help me 😅. See below:
TypeError: Cannot read properties of null (reading 'repositories')
at Object.fetchData (/home/runner/work/_actions/yoshi389111/github-profile-3d-contrib/0.7.1/dist/index.js:1430:31)
Error: error
at processTicksAndRejections (node:internal/process/task_queues:9[6](https://github.com/pranavelric/pranavelric/actions/runs/5378419004/jobs/9758190077#step:3:7):5)
at async Object.main (/home/runner/work/_actions/yoshi389111/github-profile-3d-contrib/0.[7](https://github.com/pranavelric/pranavelric/actions/runs/5378419004/jobs/9758190077#step:3:8).1/dist/index.js:1507:26)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Successful build
Desktop (please complete the following information):
Additional context
profile-3d.yml :
name: GitHub-Profile-3D-Contrib
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: generate-github-profile-3d-contrib
steps:
- uses: actions/checkout@v3
- uses: yoshi389111/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.METRICS_TOKEN }}
USERNAME: ${{ github.repository_owner }}
- name: Commit & Push
run: |
git config user.name ${{ github.repository_owner }}
git config user.email [email protected]
git add -A .
git commit -m "GitHub 3D Profile"
git push
Describe the bug
When I deployed according to the readme of https://github.com/yoshi389111/github-profile-3d-contrib, the following error message occurred:
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: yoshi389111/[email protected]. For more information see: https://github.blog/changelog/2022 -09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
I would like to know how to solve this problem, properly deploy and run the project "generate-github-profile-3d-contrib".
Desktop (please complete the following information):
There is no label on the radar chart scale.
Label the radar chart scale with "1-, 10, 100, 1K, 10K+".
問題
レーダーチャートの目盛りにラベルがない。
対策
レーダーチャートの目盛りに「1-, 10, 100, 1K, 10K+」のラベルを付ける。
Describe the bug
TypeError: Cannot read property 'repositories' of null
at Object.fetchData (/home/runner/work/_actions/yoshi389111/github-profile-3d-contrib/0.[7](https://github.com/xgqfrms/xgqfrms/actions/runs/3360733405/jobs/5570284550#step:3:8).0/dist/index.js:1430:31)
Error: error
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Object.main (/home/runner/work/_actions/yoshi3[8](https://github.com/xgqfrms/xgqfrms/actions/runs/3360733405/jobs/5570284550#step:3:9)[9](https://github.com/xgqfrms/xgqfrms/actions/runs/3360733405/jobs/5570284550#step:3:10)111/github-profile-3d-contrib/0.7.0/dist/index.js:1507:26)
https://github.com/xgqfrms/xgqfrms/actions/runs/3360733405
To Reproduce
Steps to reproduce the behavior:
Expected behavior
fix this error, and success build.
Screenshots
Desktop (please complete the following information):
Additional context
workflow.yml
name: GitHub-Profile-3D-Contrib
on:
schedule: [{cron: "59 23 * * *"}]
workflow_dispatch:
push: {branches: ["master"]}
jobs:
build:
runs-on: ubuntu-latest
name: generate-github-profile-3d-contrib
steps:
# - uses: actions/checkout@v3
- uses: actions/checkout@v2
# - uses: yoshi389111/github-profile-3d-contrib@latest
- uses: yoshi389111/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.METRICS_TOKEN }}
USERNAME: ${{ github.repository_owner }}
MAX_REPOS: 250
- name: Print env ❓
run: env | sort
- name: Commit & Push
run: |
git config user.name ${{ github.repository_owner }}
git config user.email [email protected]
git add -A .
git commit -m "feat: update GitHub 3D Profile"
git push
Hi,
First of all, thank you for your wonderful project!
I've set up rainbow
theme with custom JSON. For night theme, it looks great. But the 'day' theme looks like this:
My code now looks like
{
"type": "rainbow",
"fileName": "3d-contrib-profile-day.svg",
"backgroundColor": "#ffffff",
"foregroundColor": "#00000f",
"strongColor": "rgb(255,200,55)",
"weakColor": "#aaaaaa",
"radarColor": "#40bcd8",
"growingAnimation": true,
"saturation": "80%",
"contribLightness": [
"50%",
"40%",
"35%",
"30%",
"20%"
],
"duration": "5s",
"hueRatio": 7
}
(tried to play with hueRatio
, saturation
and contribLightness
, but without any effect.
hi. im trying to use github-profile-3d-contrib.
im created a github action and this is my profile-3d.yml :
`
name: GitHub-Profile-3D-Contrib
on:
schedule: # 03:00 JST == 18:00 UTC
- cron: "0 18 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: generate-github-profile-3d-contrib
steps:
- uses: actions/checkout@v3
- uses: yoshi389111/[email protected]
env:
GITHUB_TOKEN: my-token
USERNAME: xandner
- name: Commit & Push
run: |
git config user.name github-actions
git config user.email [email protected]
git add -A .
git commit -m "generated"
git push
`
but when i run the action get a :
Request failed with status code 401
Describe the bug
Variable name cannot start with "GITHUB_" prefix.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Note: If you also want to include the private repository, register the "personal access token" in the repository and set it to GITHUB_TOKEN specified in the workflow file.
Desktop (please complete the following information):
Change the winter color of the four seasons mode to whiter
四季モードの冬の色をより白く変更する
Hi I am getting this error can u help me solve it.
Run git config user.name github-actions
[main 65d4775] generated
10 files changed, 10 insertions(+)
create mode 100644 profile-3d-contrib/profile-gitblock.svg
create mode 100644 profile-3d-contrib/profile-green-animate.svg
create mode 100644 profile-3d-contrib/profile-green.svg
create mode 100644 profile-3d-contrib/profile-night-green.svg
create mode 100644 profile-3d-contrib/profile-night-rainbow.svg
create mode 100644 profile-3d-contrib/profile-night-view.svg
create mode 100644 profile-3d-contrib/profile-season-animate.svg
create mode 100644 profile-3d-contrib/profile-season.svg
create mode 100644 profile-3d-contrib/profile-south-season-animate.svg
create mode 100644 profile-3d-contrib/profile-south-season.svg
remote: Permission to XGavinp/XGavinp.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/XGavinp/XGavinp/': The requested URL returned error: 403
Error: Process completed with exit code 128.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
As you known, some people use sprayer github actions to auto commit code. for those commits are full of repeated commitment. just like me, i let github action make commit everyday with some shell scripts change. I just want to exclude those repos. so that the final result won't calculate those useless commits.
Describe the solution you'd like
add environment variables. let user to pass repo urls. and when doing calculate work, exclude those repos' commits.
Describe alternatives you've considered
no need other alternatives.
Additional context
check my profile 3d contribution picture. you can see the problem is there.
Describe the bug
if there are no commits it breaks
To Reproduce
Steps to reproduce the behavior:
it tries to build graph from GitHub actions and breaks please check the attached Screenshot
Expected behavior
graph should be created regardless there is a commit or not.
Desktop (please complete the following information):
Is your feature request related to a problem? Please describe.
I love your 3D contribution graph. My request is kinda simple. Is it possible to make 2 separate images for the radar chart and pie chart for ReadMe?
Describe the solution you'd like
I would like to be able to add radar chart and pie chart separately without a contribution graph.
Describe alternatives you've considered
A separate workflow that can add radar chart and pie chart separately
The repositories for which stars and forks are aggregated include non-personal repositories.
The repositories to be aggregated are only those owned by the user.
user(login: $login) {
// ...
- repositories(first: 100) {
+ repositories(first: 100, ownerAffiliations: OWNER) {
nodes {
forkCount
stargazerCount
}
}
}
星やフォークの集計対象となるリポジトリに、個人のリポジトリ以外も含まれている。
集計対象となるリポジトリは、ユーザーがオーナーの物だけを対象とする。
I would prefer to have also another svg that has
The maximum number of repositories to be aggregated is 100.
Allow the number of repositories to be aggregated to be defined by environment variables.
If no environment variable is defined, the default is 100.
- query ($login: String!) {
+ query ($login: String!, $maxRepos: Int!) {
user(login: $login) {
contributionsCollection {
- commitContributionsByRepository(maxRepositories: 100) {
+ commitContributionsByRepository(maxRepositories: $maxRepos) {
// ...
}
}
- repositories(first: 100) {
+ repositories(first: $maxRepos) {
// ...
}
}
}
集計対象のリポジトリが最大数は100件である。
集計されるリポジトリの数を環境変数で定義可能にする
環境変数が定義されていない場合、デフォルトは100件とする。
Is your feature request related to a problem? Please describe.
I mostly use my work GitHub account and all of my contributions and commits are there. Is it possible to also show the chart for the other account? or is it possible to merge the works from two accounts and display them in one chart?
The colors of the four seasons mode change depending on the month.
Make the colors of the four seasons mode every week and make a gradation.
四季モードの色を、月で切り替えている。
四季モードの色を週単位にして、グラデーションにする。
Supports Halloween mode on github.
GraphQL
user {
contributionsCollection {
isHalloween
}
}
githubのハロウィンモードに対応する。
Currently, it is profile-3d-contrib, I have a directory named images.
How to change the commit directory to images ?
Is your feature request related to a problem? Please describe.
I cant able to adjust the width of the card as i like.
Describe the solution you'd like
you can give any parameter for the height and the width of card
The user name can only be specified in an environment variable.
The user name can also be specified from the argument.
If not specified in the argument, use the environment variable USERNAME.
ユーザー名は環境変数でしか指定できない
ユーザー名を引数からも指定可能とする。
引数に指定されていない場合には、環境変数 USERNAME を使用する。
Hello,
I tried to add your action.
However it doesn't seem to work when there is already snake contributions.
Steps to reproduce the behavior:
Use the Github Action snake contributions.
Create another .yml file containing :
name: GitHub-Profile-3D-Contrib
on:
schedule: # 03:00 JST == 18:00 UTC
- cron: "0 18 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: generate-github-profile-3d-contrib
steps:
- uses: actions/checkout@v2
- uses: yoshi389111/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USERNAME: ${{ github.repository_owner }}
- name: Commit & Push
run: |
git config user.name github-actions
git config user.email [email protected]
git add -A .
git commit -m "generated"
git push
Everytime there is no workflow running.
Description : Workflow runs when I run it manually but fails in automatic run.
Hello yoshi389111,
wakatime can be integrated on several ide and provides github-like stats on technos used, a commits calendar and much more.
it might be cool to be able to integrate it into the graph to integrate stats on all projects that can't be made public (corporate projects among others).
Show the number of contributes as a tooltip
Use the title
element of SVG
コントリビュート数をツールチップとして表示する
SVG の title
要素を使用する
Hi there!
Your repo is gorgeous. Thanks for sharing.
But I have some questions about it.
You see, your Github Actions push a new generated svg everyday, but I can't see the push in your contribution box as well as your newly generated svg, just like below.
I can only suppose you did something special that can filter the automatic push.
Could you share your method of how you doing that? I will be really appreciate it.
Would it be possible to set time span via config parameter e.g. 6 months instead of 1 year period? It is also a feature used for similar component and I think it would be useful.
Is your feature request related to a problem? Please describe.
Hi! First of all thanks for this epic software. It really adds tons of info even for displaying on personal websites!
For the very same reason, I think it can be very useful if the language of the generated svg could be changed, and the path of the files too.
Describe the solution you'd like
To enable i18n, the following key can be added to json (Spanish):
{
"type": "normal",
...
"i18n": {
"commit": "Commit",
"repo": "Repositorios",
"review": "Revisiones",
"pullreq": "Pull/Req",
"issue": "Issues",
"contributions": "contribuciones",
},
"exportpath": "profile-3d-contrib-es"
}
Thus, I'd have two different paths, 1 for english (default), and another for Spanish entries, and so on...
Thanks!
An environment variable that can take a comma-delimited list of languages to filter out would be useful. For example, I have tons of old code from 20 years ago in classic ASP or Visual Basic 6 that I don't want showing up as a significant portion of my percentage and giving people the impression that I still code in those languages.
Hi!
First of all, I don't know if it is indeed a bug, I believe it is indeed a mistake on my part, but I don't know which one (lol). I'll put the error that occurred here, I hope you can help me 😅. See below:
remote: Permission to mthsBelloni/mthsBelloni.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/mthsBelloni/mthsBelloni/': The requested URL returned error: 403
Error: Process completed with exit code 128.
And here is the code of the "profile-3d.yml" file:
name: GitHub-Profile-3D-Contrib
on:
schedule: # 15:00 BRT == 18:00 UTC
- cron: "0 18 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: generate-github-profile-3d-contrib
steps:
- uses: actions/checkout@v3
- uses: yoshi389111/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USERNAME: ${{ github.repository_owner }}
- name: Commit & Push
run: |
git config user.name github-actions
git config user.email [email protected]
git add -A .
git commit -m "generated"
git push
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.