Changelog
Source:NEWS.md
rghcard (development version)
-
view_card()shows a card in the Viewer pane of RStudio or Positron, as a web page that tells the value of each column and bar when you point at it, or in the Plots pane, as a picture drawn again to the size of the pane when it is resized. It takes what the card functions return: the file of a card, SVG or PNG, or its SVG code. The examples of the card functions show their cards with it, so the help pages on the website show them too. - A new article, Cards from a user name, draws the cards of any GitHub user from their user name: in a few lines of R, in a function of your own and in a Shiny app where anyone types a user name and sees the card, with what a user name brings without a token, with one, and with the user’s own.
- A new article, Draw the cards in R, goes through drawing the cards on your own computer, step by step: installing rghcard, trying the cards on made-up statistics, seeing them in the Viewer or the Plots pane, a token for your own statistics, choosing the charts from all 23, the formats, keeping the history, charts of your own from it with base R, and the cards on your profile without the GitHub Action.
- The help pages show their links, code and lists, where they showed the Markdown they are written in, such as
[collect_stats()]and backticks. - When GitHub refuses a token,
collect_stats()gives the pages of both kinds of token, fine-grained and classic, andgitcreds::gitcreds_set()for the git credential store. - The documentation was checked against the package: the articles on the contributions and the statistics cards draw SVG files, as the others do; the README asks for R 4.1 or newer, which gh needs; the README and the articles link to the table of all 23 charts; and the description of the action names the cards of rghcard 0.4.0.
- The axis of a column chart counts in whole numbers: up to 2, it had lines at the halves, which it labelled 0, 1, 1, 1, 2, as on the stars of a code card with 2 stars.
rghcard 0.4.0
- Four new cards, so that each card stays uncluttered:
-
activity_card(): the pull requests, issues, reviews and new repositories of the user, their followers, their contributions by type as a ring, their contributions by day of the week, and the repositories they commit to most. -
visitors_card(): the unique visitors and cloners of the repositories in the last 14 days, the sites that sent them and the pages they viewed. -
actions_card(): the GitHub Actions runs, the share that succeeded, those that failed, the time they took, the busiest workflows and the repositories whose runs take longest. -
code_card(): the bytes of code in each language as a ring, the stars at the end of each month, the largest repositories, and the forks and watchers.
panelschooses from all of them. The article More cards explains them. -
- The rghcard action draws the six cards, as SVG files: sharp on any screen, and a tenth of the size of a PNG, which counts in a profile repository that keeps every version of its cards. Its new inputs are
cards, which chooses the cards,format,svg,pngor both, and the charts of the new cards,activity-panels,visitors-panels,actions-panelsandcode-panels.daysalso sets the days of the GitHub Actions card. - A profile that shows the PNG cards of rghcard 0.3.0 shows cards that are no longer updated, and the run warns of them: change
.pngto.svgin its README and delete the PNG cards, or keep PNG cards withformat: png. -
collect_stats()collects more, in new tables of the history:traffic(GitHub’s totals of its 14 days, with the unique visitors and cloners),referrersandpages(the ten top referring sites and the ten most viewed pages of each repository),languages(the bytes of code of each repository in each language),stars(the time of each star, not who gave it),profile(the followers, and the users followed) andcontribution_types(the contributions of each year by type).reposhas the watchers of each repository, andactionsthe start and the end of each run. A history of rghcard 0.3.0 still draws every card: the new tables start with the next collection, and the runs collected before have no times. -
use_rghcard_action()has the argumentscardsandformat, and prints the README code of the cards it draws. - A ring whose legend has long names, such as “Jupyter Notebook”, is a little smaller and thinner, so that the names fit, with the same room for the total in the middle.
rghcard 0.3.0
- The languages, by commits (
"commit_languages") and by repositories ("languages"), are rings: each language in the colour that GitHub gives it, as in the language bar of a repository, with a legend of the colour, the name and the share of each, and the total in the middle. A ring has five languages at most, and the rest together as “Other”. The colours come from GitHub Linguist, MIT licence (inst/COPYRIGHTS);data-raw/language-colors.Rupdates them. - The rghcard action reads the contributions with the token of its workflow, which sees the profile as others see it. With the token of the user, a fine-grained one that reads only the traffic, GitHub left the private contributions out: on a profile that shows them, the card had half of them and shorter streaks.
collect_stats()has a new argument,contributions_token, for the token of the contributions. -
use_rghcard_action()prints a link that fills in GitHub’s form for the token: its name, the one permission it needs and no expiration, which GitHub would otherwise set to 30 days. The README and the Get started article give the same link, and the README says how to create the workflow on GitHub’s website.
rghcard 0.2.0
- rghcard is also a GitHub Action, for those who do not use R:
uses: sedzinfo/rghcard@v0in a workflow of the profile repository installs R and rghcard on GitHub’s machine, collects the statistics, draws both cards and commits them, with their history. Its inputs choose the themes, the days and the charts of the cards, private repositories and forks, the folders, and whether to commit. The README shows the workflow and the inputs. -
use_rghcard_action()writes a workflow that runs the action.
rghcard 0.1.0
First version.
-
collect_stats()collects the statistics of the repositories a GitHub user owns: repositories, stars, forks, languages, release downloads and GitHub Actions runs, and, with a token of the user, page views and clones. It adds them to a history of CSV files, which keeps the traffic beyond the 14 days that GitHub keeps. Private repositories and forks are left out unless asked for. A token that GitHub refuses, because it expired or was revoked, stops it with a message on how to replace it. -
stats_card()draws the statistics as a card for a GitHub profile, a PNG or an SVG file, in the colours of GitHub’s dark or light mode: a row of key figures and up to three charts, from page views, clones and GitHub Actions runs per day, the most viewed, cloned and starred repositories, and the languages. -
contributions_card()draws the contributions of the user, the numbers of the contribution graph of their profile, as a card: the contributions since joining GitHub and in the last 12 months, the commits, the current and longest streaks, the contributions per month, and the languages by commits and by repositories.collect_stats()collects them from GitHub’s GraphQL API. -
use_rghcard_action()writes a GitHub Actions workflow into a profile repository, which installs the latest release of rghcard, collects the statistics, draws both cards and commits them every week. -
read_stats()reads the history again, andexample_stats()returns made-up statistics to try the cards without a token.