[READ-ONLY] Mirror of https://github.com/probablykasper/readme-template-action. Integrate GitHub API data in your README.md
0

Configure Feed

Select the types of activity you want to include in your feed.

Added 3_NEWEST_REPOS

Kasper (Aug 23, 2020, 5:06 AM +0200) f9ff292c 806c4cfa

+46 -22
+14 -6
EXAMPLE_OUTPUT.md
··· 9 9 | 75686 | 2014-08-19T04:33:40Z | [golang/go](https://github.com/golang/go) | The Go programming language | 10 10 | 0 | 2020-08-16T02:48:43Z | [probablykasper/embler](https://github.com/probablykasper/embler) | Turn binaries into applications | 11 11 12 - ## 5 most starred repos table 12 + ## 3 most starred repos table 13 13 14 14 | ⭐️Stars | 📦Repo | 📚Description | 15 15 | --------- | ----------- | -------------- | ··· 17 17 | 4 | [probablykasper/homebrew-tap](https://github.com/probablykasper/homebrew-tap) | My Homebrew casks and formulas | 18 18 | 2 | [probablykasper/cryp](https://github.com/probablykasper/cryp) | Cryptocurrency portfolio tracker | 19 19 20 - ## 5 most starred repos list 20 + ## 3 most starred repos list 21 21 22 22 ⭐️ 10 [probablykasper/chester-syntax](https://github.com/probablykasper/chester-syntax): A pretty Atom syntax theme based on Lonely Planet colours 23 23 ··· 45 45 - **SIGNUP_MMMM**: March 46 46 - **SIGNUP_D**: 4 47 47 - **SIGNUP_DO**: 4th 48 - - **TOTAL_REPOS_SIZE_KB**: 723951 49 - - **TOTAL_REPOS_SIZE_MB**: 724 50 - - **TOTAL_REPOS_SIZE_GB**: 0.72 51 - - **TOTAL_REPOSITORIES**: 47 48 + - **TOTAL_REPOS_SIZE_KB**: 707434 49 + - **TOTAL_REPOS_SIZE_MB**: 707.4 50 + - **TOTAL_REPOS_SIZE_GB**: 0.71 51 + - **TOTAL_REPOSITORIES**: 46 52 + 53 + ## 3 newest repos 54 + 55 + | ⭐️Stars | 📦Repo | 📚Description | 56 + | --------- | ----------- | -------------- | 57 + | 0 | [probablykasper/readme-template-action](https://github.com/probablykasper/readme-template-action) | Fills in variables (with loop support) from a TEMPLATE.md into a README.md | 58 + | 0 | [probablykasper/embler](https://github.com/probablykasper/embler) | Turn binaries into applications | 59 + | 0 | [probablykasper/svelte-preprocess](https://github.com/probablykasper/svelte-preprocess) | A ✨ magical ✨ Svelte preprocessor with sensible defaults and support for: PostCSS, SCSS, Less, Stylus, Coffeescript, TypeScript, Pug and much more. |
+10 -2
EXAMPLE_TEMPLATE.md
··· 31 31 | {{ REPO_STARS }} | {{ REPO_CREATED_DATE }} | [{{ REPO_FULL_NAME }}]({{ REPO_URL }}) | {{ REPO_DESCRIPTION }} | 32 32 {{ end CUSTOM_PINNED_REPOS }} 33 33 34 - ## 5 most starred repos table 34 + ## 3 most starred repos table 35 35 36 36 | ⭐️Stars | 📦Repo | 📚Description | 37 37 | --------- | ----------- | -------------- | ··· 39 39 | {{ REPO_STARS }} | [{{ REPO_FULL_NAME }}]({{ REPO_URL }}) | {{ REPO_DESCRIPTION }} | 40 40 {{ end 3_MOST_STARRED_REPOS }} 41 41 42 - ## 5 most starred repos list 42 + ## 3 most starred repos list 43 43 44 44 {{ loop 3_MOST_STARRED_REPOS }} 45 45 ⭐️ {{ REPO_STARS }} [{{ REPO_FULL_NAME }}]({{ REPO_URL }}): {{ REPO_DESCRIPTION }} ··· 69 69 - **TOTAL_REPOS_SIZE_MB**: {{ TOTAL_REPOS_SIZE_MB }} 70 70 - **TOTAL_REPOS_SIZE_GB**: {{ TOTAL_REPOS_SIZE_GB }} 71 71 - **TOTAL_REPOSITORIES**: {{ TOTAL_REPOSITORIES }} 72 + 73 + ## 3 newest repos 74 + 75 + | ⭐️Stars | 📦Repo | 📚Description | 76 + | --------- | ----------- | -------------- | 77 + {{ loop 3_NEWEST_REPOS }} 78 + | {{ REPO_STARS }} | [{{ REPO_FULL_NAME }}]({{ REPO_URL }}) | {{ REPO_DESCRIPTION }} | 79 + {{ end 3_NEWEST_REPOS }}
+9 -2
README.md
··· 135 135 <td><code>3_MOST_STARRED_REPOS</code></td> 136 136 <td>repos</td> 137 137 <td> 138 - Fetches your 5 most starred repos. 138 + Fetches your 3 most starred repos. 139 + Uses the following parameters: 140 + <pre>first: 3,<br>privacy: PUBLIC,<br>ownerAffiliations:[OWNER],<br>orderBy: { field:STARGAZERS, direction: DESC }</pre> 141 + </td> 142 + <td><code>3_NEWEST_REPOS</code></td> 143 + <td>repos</td> 144 + <td> 145 + Fetches your 3 most starred repos. 139 146 Uses the following parameters: 140 - <pre>first: 5,<br>privacy: PUBLIC,<br>ownerAffiliations:[OWNER],<br>orderBy: { field:STARGAZERS, direction: DESC }</pre> 147 + <pre>first: 3,<br>privacy: PUBLIC,<br>ownerAffiliations:[OWNER],<br>orderBy: { field:CREATED_AT, direction: DESC }</pre> 141 148 </td> 142 149 </tr> 143 150 <tr>
+13 -12
index.js
··· 83 83 console.log('User data: Injecting') 84 84 outputStr = inject(outputStr, user) 85 85 86 - // console.log('Searching for 3_MOST_STARRED_REPOS') 87 - // outputStr = await injectLoop(outputStr, '3_MOST_STARRED_REPOS', async () => { 88 - // console.log('3_MOST_STARRED_REPOS: Fetching') 89 - // const starredRepos = await queries.getRepos(` 90 - // first: 3, 91 - // privacy: PUBLIC, 92 - // ownerAffiliations:[OWNER], 93 - // orderBy: { field:STARGAZERS, direction: DESC } 94 - // `) 95 - // console.log('3_MOST_STARRED_REPOS: Injecting') 96 - // return starredRepos 97 - // }) 98 86 if (!customTemplate['3_MOST_STARRED_REPOS']) { 99 87 customTemplate['3_MOST_STARRED_REPOS'] = { 100 88 type: 'repos', ··· 106 94 ` 107 95 } 108 96 } 97 + if (!customTemplate['3_NEWEST_REPOS']) { 98 + customTemplate['3_NEWEST_REPOS'] = { 99 + type: 'repos', 100 + params: ` 101 + first: 3, 102 + privacy: PUBLIC, 103 + ownerAffiliations:[OWNER], 104 + orderBy: { field:CREATED_AT, direction: DESC } 105 + ` 106 + } 107 + } 109 108 110 109 for (const [templateName, template] of Object.entries(customTemplate)) { 111 110 if (template.type === 'repos' || template.type === 'specificRepos') { ··· 114 113 const repos = template.type === 'repos' 115 114 ? await queries.getRepos(template.params) 116 115 : await queries.getSpecificRepos(user.USERNAME, template.repos) 116 + 117 117 if (typeof template.modifyVariables === 'function') { 118 118 for (let i = 0; i < repos.length; i++) { 119 119 repos[i] = template.modifyVariables(repos[i]) 120 120 } 121 121 } 122 + 122 123 console.log(templateName+': Injecting') 123 124 outputStr = await injectLoop(outputStr, templateName, repos) 124 125