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

Merge from upstream #2

Merged
merged 160 commits into from
Apr 29, 2023
Merged
Changes from 1 commit
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
f8e32f9
ci: add e2e vercel test action (#2054)
rickstaa Oct 1, 2022
6b7e91a
ci: improve theme-preview actiot push (#2065)
rickstaa Oct 1, 2022
d5d8912
ci: improve theme preview action (#2088)
rickstaa Oct 2, 2022
aaf710c
ci: fix e2e test
rickstaa Oct 2, 2022
f86059f
chore: Update workflows to cache dependencies (#2083)
jongwooo Oct 2, 2022
0983310
ci(label-pr): upgrade actions/labeler to v4 (#2080)
oscard0m Oct 2, 2022
51e7887
ci: fix e2e test
rickstaa Oct 2, 2022
986070a
Merge branch 'master' of github.com:anuraghazra/github-readme-stats
rickstaa Oct 2, 2022
b8faef6
ci: add stale theme pull request closer action push (#2067)
rickstaa Oct 2, 2022
406dbc5
feat: add transparent theme
rickstaa Oct 2, 2022
510cf62
feat: remove border color from transparent theme
rickstaa Oct 2, 2022
3a07cb0
ci: fix e2e test
rickstaa Oct 2, 2022
f0daab1
feat: added default options to readme (#2051)
Jagrutiti Oct 2, 2022
6f8bd9f
ci: increase top-issues dashboard update frequency
rickstaa Oct 2, 2022
d56b294
style: improve code style
rickstaa Oct 2, 2022
84c9d35
docs(theme): Auto update theme readme (#2091)
anuraghazra Oct 2, 2022
822efbf
ci: fix small bugs in theme-preview action (#2093)
rickstaa Oct 2, 2022
5d42af5
ci: fix small bug in theme-preview action
rickstaa Oct 2, 2022
2faf9c5
docs: fix link to go India logo svg (#2085)
ibrouos Oct 2, 2022
c2c984a
docs: format readme
rickstaa Oct 2, 2022
c5bea57
docs: fix india care logo
rickstaa Oct 2, 2022
aa084f3
Added Contributors Badge (#2096)
Manan1612 Oct 3, 2022
9e1fc0b
update default values in readme (#2094)
Ayushi96 Oct 3, 2022
c03bb2f
fix: adding docstrings to the files where it was missing (#2101)
Jagrutiti Oct 3, 2022
7accd1a
feat: default values for wakatime and language (#2103)
adi-uchiha Oct 4, 2022
e6a6384
docs: improve readme syntax (#2106)
rickstaa Oct 4, 2022
388ba06
Update the Vercel deployement guide (#2102)
DecryptAG Oct 4, 2022
acbc03d
Fix card length during error (#2105)
nekiwo Oct 4, 2022
af97e57
fix: fetch all repos for for the stats card (#2100)
MatteoPierro Oct 4, 2022
94d0978
docs: fix readme logo alignment (#2112)
rickstaa Oct 4, 2022
aae83cb
fix: temporary disable multi page star fetch
rickstaa Oct 4, 2022
cea4a39
ci: improve theme preview action
rickstaa Oct 7, 2022
04595df
style: improve formatting
rickstaa Oct 7, 2022
bcb8ae9
style: improve small syntax error
rickstaa Oct 7, 2022
e8dfbde
Add format script to pre-commit hook (#2146)
HwangTaehyun Oct 7, 2022
15620a1
test: fix tests
rickstaa Oct 7, 2022
df243ef
docs: update readme
rickstaa Oct 7, 2022
1553359
docs: add admonition boxes
rickstaa Oct 7, 2022
5c514db
docs: improve admonition boxes
rickstaa Oct 7, 2022
d7451d8
docs: improve caching documentation
rickstaa Oct 7, 2022
343058c
fix: adding doc strings to files in src folder where it was missing (…
shivam1646 Oct 7, 2022
36a8c39
fix: improve graphql error handling
rickstaa Oct 7, 2022
06e3e05
ci: updated issue template (#2127)
Choromanski Oct 7, 2022
80e8233
style: improve templates formatting
rickstaa Oct 7, 2022
39535db
style: update formatting
rickstaa Oct 7, 2022
bd9865d
test: burst cache in e2e tests (#2154)
rickstaa Oct 7, 2022
6001270
test: increase stats card e2e timeout
rickstaa Oct 8, 2022
fcd0588
test: cleanup tests
rickstaa Oct 9, 2022
f77e34e
ci: add question template
rickstaa Oct 9, 2022
0a394a6
ci: add issues template config and remove question template
rickstaa Oct 9, 2022
4df8094
fix: prevent errors from being cached (#2160)
rickstaa Oct 9, 2022
f0f92c2
test: add cache on error test
rickstaa Oct 10, 2022
c4bfacb
docs: add fork update guide
rickstaa Oct 10, 2022
166972d
docs: improve syntax
rickstaa Oct 10, 2022
7eb85d3
refactor: add extra links to issues template
rickstaa Oct 11, 2022
32b8daa
refactor: improve issues template (#2180)
rickstaa Oct 11, 2022
8dd7092
refactor: improve issues template formatting
rickstaa Oct 11, 2022
6fdf73f
test: increase e2e test timeout
rickstaa Oct 11, 2022
dea583d
build: create npm package (#2151)
rickstaa Oct 13, 2022
f7a2b21
fix: fix I18n import error
rickstaa Oct 13, 2022
65424fa
fix: improve json import (#2190)
rickstaa Oct 13, 2022
54cc291
Revert "fix: improve json import (#2190)" (#2191)
rickstaa Oct 13, 2022
bb56e3b
fix: text overlapped on zh-tw locale (#2192)
kurt-liao Oct 15, 2022
1d10912
ci: fix stale closer action review sort bug (#2201)
rickstaa Oct 16, 2022
dcc4ccd
ci: increase invalid theme close time (#2210)
rickstaa Oct 18, 2022
98f9045
fix: improve error caching behavoir (#2211)
rickstaa Oct 18, 2022
8e31470
refactor: make issue templates required (#2226)
rickstaa Oct 24, 2022
199870a
refactor: fix GitHub capitalization (#2232)
friederbluemle Oct 26, 2022
45f434f
docs: document auto theme change #2074 (#2229)
lostgirljourney Oct 28, 2022
f993f21
Update readme.md
rickstaa Oct 28, 2022
c0d7493
Fix truncation of compact wakatime progress bar when langs_count is s…
raychanks Oct 28, 2022
f9e95b1
Corrections of Polish expressions in translations.js (#2240)
InfoTCube Oct 29, 2022
56aa307
ci: update theme stale close message
rickstaa Nov 18, 2022
1a4e5a6
ci: update theme stale close message
rickstaa Nov 18, 2022
26cde6b
Missing term in calculation of TOTAL_VALUES. (#2116)
fjosw Nov 18, 2022
0c829e9
Updates the brazilian readme (#2245)
ItaloSa Nov 18, 2022
9aa39df
feat: allow users to pass ring_color param (#2075)
Pranav2612000 Nov 19, 2022
0e02523
feat: added Date Night theme to index.js (#2264)
jesterb0206 Nov 19, 2022
b2e34ac
test: update snapshots
rickstaa Nov 20, 2022
4b656eb
refactor: migrate to using arrow functions (#2033)
rickstaa Nov 21, 2022
5df25a6
fix: improve boolean parse behaviour (#2029)
rickstaa Nov 21, 2022
42a4b6f
refactor: remove unused dotenv calls (#2059)
rickstaa Nov 21, 2022
f07cd13
fix: fix retry max-out bug (#2121)
rickstaa Nov 21, 2022
3cb205c
feat: improve card loading speed (#2124)
rickstaa Nov 21, 2022
ada9cf4
feat: add INCLUDE_ORGS env variable (#2275)
rickstaa Nov 21, 2022
0efb982
Revert "feat: add INCLUDE_ORGS env variable (#2275)" (#2276)
rickstaa Nov 21, 2022
ad3726e
fix: fix repoContrib confusion (#2269) (#2274)
rickstaa Nov 22, 2022
9eb0c3c
feat: fix 'include_all_commits' inner card margin (#2283)
rickstaa Nov 22, 2022
42fdff6
build(deps): bump json5 from 2.2.1 to 2.2.3 (#2373)
dependabot[bot] Jan 9, 2023
227711c
test: update snapshots
rickstaa Jan 10, 2023
77dcdab
Add loading Animation to Most used Language card (#2197)
RedHeadphone Jan 10, 2023
5ae959b
ci: fix theme readme generation action (#2271)
rickstaa Jan 10, 2023
0850a97
Revert "build(deps): bump json5 from 2.2.1 to 2.2.3 (#2373)" (#2393)
rickstaa Jan 12, 2023
70f0264
Revert "ci: fix theme readme generation action (#2271)" (#2394)
rickstaa Jan 12, 2023
4b8198f
Revert "Add loading Animation to Most used Language card (#2197)" (#2…
rickstaa Jan 12, 2023
0ff426d
fix: retryer fixed (#2400)
anuraghazra Jan 13, 2023
ab9c563
Revert "Revert "ci: fix theme readme generation action (#2271)" (#239…
rickstaa Jan 16, 2023
ad9db67
refactor: update code formatting
rickstaa Jan 16, 2023
06a2a78
Revert "Revert "Add loading Animation to Most used Language card (#21…
rickstaa Jan 16, 2023
8bc69e7
Update readme.md (#2442)
Zo-Bro-23 Jan 19, 2023
d5d1f44
test: fix e2e tests
rickstaa Jan 21, 2023
cfa8423
test: update snapshots
rickstaa Jan 21, 2023
eab1402
test: fix e2e test data
rickstaa Jan 21, 2023
fbb49e3
test: update e2e test data
rickstaa Jan 21, 2023
4ff2c2a
feat: fix e2e tests
rickstaa Jan 21, 2023
c1dc7b8
fix: fix e2e test data
rickstaa Jan 21, 2023
60fae29
feat: enable multi page star fetching for private vercel instances (#…
rickstaa Jan 21, 2023
8667ea9
Merge branch 'master' of https://github.com/anuraghazra/github-readme…
anuraghazra Jan 21, 2023
a17fa1c
chore: resolve conflict (#2453)
anuraghazra Jan 21, 2023
4b17300
Merge branch 'master' of https://github.com/anuraghazra/github-readme…
anuraghazra Jan 21, 2023
b2bf4fa
fix: change prod deployment branch to vercel branch to fix maxDuratio…
Zo-Bro-23 Jan 24, 2023
cd5cbcd
fix: fixes card overflow problem #2452 (#2460)
rickstaa Jan 24, 2023
99d9d3c
ci: prevent certain actions from running on forks (#2466)
rickstaa Jan 25, 2023
077d405
feat: add PAT monitoring functions (#2178)
rickstaa Jan 28, 2023
7aa502d
chore: minor changes in pat info (#2481)
anuraghazra Jan 28, 2023
1120006
ci: add update languages action (#2484)
rickstaa Jan 29, 2023
888663a
Add `rose` theme (#2480)
Meezzi Feb 14, 2023
ba7c2f8
Support hide_progress for top-langs feature (#2514)
amirhakimnejad Feb 16, 2023
5f20e6c
add holi_theme (#2539)
mohamedhassan279 Feb 25, 2023
a6ff0fa
Add one_dark_pro (#2507)
b3dyk Feb 25, 2023
f3f7a48
fix: fix JSON themes bug. (#2544)
catelinemnemosyne Feb 25, 2023
55a303b
Add auto-labelling for documentation updates (#2526)
Zo-Bro-23 Feb 25, 2023
91345ed
ci: fix unsafe directory bug (#2518)
rickstaa Feb 25, 2023
8898d01
Update readme.md (#2414)
raphaelricardo10 Feb 25, 2023
a3c6f87
test: update snapshots (#2519)
rickstaa Feb 25, 2023
2ab8b85
fix: for issue #2534 (#2536)
md-rehman Feb 25, 2023
1d528da
Add option to deploy using other services (#2525)
Zo-Bro-23 Feb 25, 2023
82224fa
ci: update e2e tests (#2548)
rickstaa Feb 25, 2023
d5fbfb4
ci: fix a bug in the theme preview action (#2549)
rickstaa Feb 25, 2023
252c2b4
refactor: format code (#2550)
rickstaa Feb 26, 2023
d60d53c
refactor: update languages JSON (#2554)
github-actions[bot] Mar 1, 2023
8849b5f
Preview theme workflow fix (#2557)
Zo-Bro-23 Mar 1, 2023
a1c3c6a
ci: preview theme workflow fix (#2559)
Zo-Bro-23 Mar 1, 2023
9ec2c83
refactor: fix code comments and change 'up' rate limit (#2560)
rickstaa Mar 2, 2023
7bc8f19
Preview action fix (#2561)
Zo-Bro-23 Mar 2, 2023
9767710
ci: fix theme preview action (#2563)
rickstaa Mar 3, 2023
1e61f9f
fix theme preview (#2564)
rickstaa Mar 3, 2023
ed18914
ci: fixes theme preview action (#2566)
rickstaa Mar 5, 2023
b93aee3
ci: improve theme preview action (#2572)
rickstaa Mar 6, 2023
c5063b9
Added "Shadow" set (Red, Green, Blue, transparent BG) (#2529)
Etanarvazac Mar 8, 2023
2bd9d45
ci: fix theme docs generate bug (#2573)
rickstaa Mar 9, 2023
3299829
update my theme (#2576)
eduardozaniboni Mar 14, 2023
b928f51
refactor: update languages JSON (#2596)
github-actions[bot] Mar 31, 2023
d8244a7
Add format stats option (#2155)
CaedenPH Apr 1, 2023
4d1d83d
add github_dark_dimmed theme (#2594)
fabianocouto Apr 1, 2023
879937c
feat(RankIcon): add rank_icon option (#2628)
fabianocouto Apr 24, 2023
aec73d2
Updated the custom error there was a Typo. (#2618)
LokeshXs Apr 24, 2023
be0d966
Fix typos inside wakatime test name (#2617)
qwerty541 Apr 24, 2023
da5f82f
removed redundant comparison (#957)
qwerty541 Apr 25, 2023
8aacec0
dev (#1782)
qwerty541 Apr 25, 2023
21a9ba4
fix path to powered by vercel image (#1792)
qwerty541 Apr 25, 2023
da46a50
Synchonize cache seconds min value inside docs translations with main…
qwerty541 Apr 25, 2023
5577bbf
New top language algorithm implementation (#1732)
kitswas Apr 25, 2023
f5f0a79
feat: improve CONTRIBUTING.md (#2609)
rickstaa Apr 28, 2023
fd64333
docs: update give logo (#2605)
rickstaa Apr 28, 2023
30a45d3
Fixed typo in word color inside README (#2652)
qwerty541 Apr 28, 2023
6eebfe3
Fixed docs typo inside src/common/utils.js (#2651)
qwerty541 Apr 28, 2023
a82a617
Fixed several typos inside preview theme script (#2650)
qwerty541 Apr 28, 2023
31d1ab4
Fixed todo inside stats card data fetcher (#2649)
qwerty541 Apr 28, 2023
3bd6519
docs: fix README language card usage order (#2659)
rickstaa Apr 29, 2023
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
Prev Previous commit
Next Next commit
ci: improve theme preview action (anuraghazra#2572)
  • Loading branch information
rickstaa authored Mar 6, 2023

Verified

This commit was signed with the committer’s verified signature.
ob-stripe Olivier Bellone
commit b93aee34d0101aed1de0b5d7cc68c3bb19614d52
41 changes: 30 additions & 11 deletions scripts/preview-theme.js
Original file line number Diff line number Diff line change
@@ -312,18 +312,30 @@ const parseJSON = (json) => {
);
}
} catch (error) {
let parsedJson = json
// Remove trailing commas (if any).
let parsedJson = json.replace(/(,\s*})/g, "}");

// Remove JS comments (if any).
parsedJson = parsedJson.replace(/\/\/[A-z\s]*\s/g, "");

// Fix incorrect open bracket (if any).
const splitJson = parsedJson
.split(/([\s\r\s]*}[\s\r\s]*,[\s\r\s]*)(?=[\w"-]+:)/)
.filter((x) => typeof x !== "string" || !!x.trim());
if (parsedJson[0].replace(/\s+/g, "") === "},") {
parsedJson[0] = "},";
if (!/\s*}\s*,?\s*$/.test(parsedJson[1])) {
parsedJson.push(parsedJson.shift());
.filter((x) => typeof x !== "string" || !!x.trim()); // Split json into array of strings and objects.
if (splitJson[0].replace(/\s+/g, "") === "},") {
splitJson[0] = "},";
if (!/\s*}\s*,?\s*$/.test(splitJson[1])) {
splitJson.push(splitJson.shift());
} else {
parsedJson.shift();
splitJson.shift();
}
return Hjson.parse(parsedJson.join(""));
} else {
parsedJson = splitJson.join("");
}

// Try to parse the fixed json.
try {
return Hjson.parse(parsedJson);
} catch (error) {
throw new IncorrectJsonFormatError(
`Theme JSON file could not be parsed: ${error.message}`,
);
@@ -387,10 +399,17 @@ export const run = async () => {
// Retrieve theme changes from the PR diff.
debug("Retrieve themes...");
const diff = parse(res.data);

// Retrieve all theme changes from the PR diff and convert to JSON.
debug("Retrieve theme changes...");
const content = diff
.find((file) => file.to === "themes/index.js")
.chunks[0].changes.filter((c) => c.type === "add")
.map((c) => c.content.replace("+", ""))
.chunks.map((chunk) =>
chunk.changes
.filter((c) => c.type === "add")
.map((c) => c.content.replace("+", ""))
.join(""),
)
.join("");
const themeObject = parseJSON(content);
if (