Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1343e95f52 | ||
|
0dc2a51ddf | ||
|
90a2e06350 | ||
|
7841262e74 | ||
|
c9ff7972ed |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -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)
|
||||
|
||||
|
||||
|
22
README.md
22
README.md
@@ -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
|
||||
|
@@ -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
|
||||
|
3
index.js
3
index.js
@@ -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),
|
||||
|
@@ -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';
|
||||
|
@@ -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(
|
||||
{
|
||||
|
Reference in New Issue
Block a user