5 Commits

Author SHA1 Message Date
simonecorsi
1343e95f52 chore(release): 2.1.0 [skip ci]
# [2.1.0](https://github.com/simonecorsi/mawesome/compare/v2.0.0...v2.1.0) (2022-05-11)

### Bug Fixes

* removes console.log ([7841262](7841262e74))

### Features

* removes github-token need ([0dc2a51](0dc2a51ddf))
2022-05-11 14:25:46 +00:00
GitHub Actions
0dc2a51ddf feat: removes github-token need 2022-05-11 16:22:50 +02:00
GitHub Actions
90a2e06350 chore: updates readme 2022-05-11 16:20:39 +02:00
GitHub Actions
7841262e74 fix: removes console.log 2022-05-11 16:10:51 +02:00
Simone Corsi
c9ff7972ed chore(readme): update 2022-05-11 16:08:14 +02:00
6 changed files with 28 additions and 15 deletions

View File

@@ -1,3 +1,15 @@
# [2.1.0](https://github.com/simonecorsi/mawesome/compare/v2.0.0...v2.1.0) (2022-05-11)
### Bug Fixes
* removes console.log ([7841262](https://github.com/simonecorsi/mawesome/commit/7841262e741f05debb7ffe6fed636a508a8f7c12))
### Features
* removes github-token need ([0dc2a51](https://github.com/simonecorsi/mawesome/commit/0dc2a51ddf3cf93414afd674ed3c34ec681f3e4b))
# [2.0.0](https://github.com/simonecorsi/mawesome/compare/v1.0.45...v2.0.0) (2022-05-11)

View File

@@ -12,6 +12,7 @@ You can see an example of the output at my own [simonecorsi/awesome](https://git
- [Requirements](#requirements)
- [Configuration](#configuration)
- [`api-token`](#api-token)
- [`template-path`](#template-path)
- [Example workflow](#example-workflow)
<!-- tocstop -->
@@ -27,14 +28,13 @@ You can see an example of the output at my own [simonecorsi/awesome](https://git
The service can be configured setting the appropriate environment variables or writing an `.env` file.
| Variable | Description | Default |
| ----------------- | -------------------------------------------------------------------- | -------------------------------- |
| `api-token` | Personal github api token. | `${{ secrets.API_TOKEN }}` |
| `github-token` | Action Token | `${{ secrets.GITHUB_TOKEN }}` |
| `github-name` | Name used for the commit, default to action | Github Action |
| `github-email` | email used for commit, default to action | actions@users.noreply.github.com |
| `template-path` | Custom output template file ([EJS](https://ejs.co/) template engine) | [TEMPLATE.ejs](./TEMPLATE.ejs) |
| `output-filename` | Output filename | `README.md` |
| Variable | Description | Default |
| ----------------- | ------------------------------------------------------------------- | -------------------------------- |
| `api-token` | Personal Token is used to avoid rate limit, [read more](#api-token) | `${{ secrets.API_TOKEN }}` |
| `github-name` | Name used for the commit | Github Action |
| `github-email` | email used for commit | actions@users.noreply.github.com |
| `template-path` | Custom `README.md` template, [read more](#template-path) |
| `output-filename` | Output filename | `README.md` |
#### `api-token`
@@ -42,6 +42,12 @@ The Personal API Access Token is mandatory to fetch stars from the API without i
You'll have to generate a [personal api token](https://github.com/settings/tokens/new) and then add
#### `template-path`
If you don't like the output (default example [here](./TEMPLATE.ejs) ), you can provide your custom template that will be rendered using [EJS](https://ejs.co/) template engine.
Path provided is relative to your current repository directory, if file is not found it will default.
## Example workflow
```yml

View File

@@ -4,9 +4,6 @@ branding:
icon: align-justify
color: yellow
inputs:
github-token:
description: 'Github token'
required: true
api-token:
description: 'Personal API Token'
required: true

View File

@@ -12780,7 +12780,7 @@ class Git {
this.push = () => this.exec(`push origin ${branch} --follow-tags`);
this.updateOrigin = (repo) => this.exec(`remote set-url origin ${repo}`);
this.createTag = (tag) => this.exec(`tag -a ${tag} -m "${tag}"`);
const githubToken = core.getInput('github-token', { required: true });
const githubToken = core.getInput('api-token', { required: true });
core.setSecret(githubToken);
const githubName = core.getInput('github-name') || 'GitHub Actions';
const githubEmail = core.getInput('github-email') || 'actions@users.noreply.github.com';
@@ -12974,7 +12974,6 @@ function main() {
accessToken: core.getInput('api-token', { required: true }),
compactByLanguage: true,
});
console.log('sortedByLanguages :>> ', sortedByLanguages);
const rendered = yield (0, helpers_1.renderer)({
username: helpers_1.REPO_USERNAME,
stars: Object.entries(sortedByLanguages),

View File

@@ -15,7 +15,7 @@ type File = {
class Git {
constructor() {
const githubToken = core.getInput('github-token', { required: true });
const githubToken = core.getInput('api-token', { required: true });
core.setSecret(githubToken);
const githubName = core.getInput('github-name') || 'GitHub Actions';

View File

@@ -31,7 +31,6 @@ export async function main() {
accessToken: core.getInput('api-token', { required: true }),
compactByLanguage: true,
});
console.log('sortedByLanguages :>> ', sortedByLanguages);
const rendered = await renderer(
{