Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ab02c0d880 | ||
|
fc187df45e | ||
|
389dc4441f | ||
|
bbc8ec9ca5 | ||
|
10151792e7 | ||
|
012928bcda | ||
|
fe15d9358c | ||
|
5753aefaa3 | ||
|
fb228f6b20 | ||
|
903c070e54 | ||
|
58a7dc17bf | ||
|
3ad155575d |
59
CHANGELOG.md
59
CHANGELOG.md
@@ -1,36 +1,35 @@
|
|||||||
|
## <small>1.0.34 (2021-05-19)</small>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## <small>1.0.33 (2021-05-19)</small>
|
||||||
|
|
||||||
|
* chore(release): v1.0.33 ([fc187df](https://github.com/simonecorsi/mawesome/commit/fc187df))
|
||||||
|
* build(deps): bump handlebars from 4.7.6 to 4.7.7 ([012928b](https://github.com/simonecorsi/mawesome/commit/012928b))
|
||||||
|
* build(deps): bump lodash from 4.17.20 to 4.17.21 ([1015179](https://github.com/simonecorsi/mawesome/commit/1015179))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## <small>1.0.32 (2021-01-22)</small>
|
||||||
|
|
||||||
|
* chore: removed unused npm packages ([3ad1555](https://github.com/simonecorsi/mawesome/commit/3ad1555))
|
||||||
|
* chore(release): v1.0.32 ([fe15d93](https://github.com/simonecorsi/mawesome/commit/fe15d93))
|
||||||
|
* docs: added documentation ([5753aef](https://github.com/simonecorsi/mawesome/commit/5753aef))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## <small>1.0.31 (2021-01-21)</small>
|
||||||
|
|
||||||
|
* chore(release): v1.0.31 ([903c070](https://github.com/simonecorsi/mawesome/commit/903c070))
|
||||||
|
* feat: added user/email input for commiting ([58a7dc1](https://github.com/simonecorsi/mawesome/commit/58a7dc1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## <small>1.0.30 (2021-01-16)</small>
|
## <small>1.0.30 (2021-01-16)</small>
|
||||||
|
|
||||||
|
* chore(release): v1.0.30 ([a5f15da](https://github.com/simonecorsi/mawesome/commit/a5f15da))
|
||||||
* fix: removed push ([7f42ca0](https://github.com/simonecorsi/mawesome/commit/7f42ca0))
|
* fix: removed push ([7f42ca0](https://github.com/simonecorsi/mawesome/commit/7f42ca0))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## <small>1.0.29 (2021-01-16)</small>
|
|
||||||
|
|
||||||
* chore(release): v1.0.29 ([874894b](https://github.com/simonecorsi/mawesome/commit/874894b))
|
|
||||||
* ci: on pull_request hook ([748c821](https://github.com/simonecorsi/mawesome/commit/748c821))
|
|
||||||
* ci: test on push ([226c942](https://github.com/simonecorsi/mawesome/commit/226c942))
|
|
||||||
* feat: added test workflow for pr ([1bd01f6](https://github.com/simonecorsi/mawesome/commit/1bd01f6))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## <small>1.0.28 (2021-01-16)</small>
|
|
||||||
|
|
||||||
* chore(release): v1.0.28 ([c805822](https://github.com/simonecorsi/mawesome/commit/c805822))
|
|
||||||
* tests: added tests ([b8890fc](https://github.com/simonecorsi/mawesome/commit/b8890fc))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## <small>1.0.27 (2021-01-16)</small>
|
|
||||||
|
|
||||||
* chore(release): v1.0.27 ([bf07858](https://github.com/simonecorsi/mawesome/commit/bf07858))
|
|
||||||
* docs: typo ([46172a5](https://github.com/simonecorsi/mawesome/commit/46172a5))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## <small>1.0.26 (2021-01-16)</small>
|
|
||||||
|
|
||||||
* chore: added link to project ([0543c05](https://github.com/simonecorsi/mawesome/commit/0543c05))
|
|
||||||
* chore(release): v1.0.26 ([8bc2714](https://github.com/simonecorsi/mawesome/commit/8bc2714))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
42
README.md
42
README.md
@@ -1,20 +1,41 @@
|
|||||||
# My Awesome list
|
# My Awesome List
|
||||||
|
|
||||||
This action query the github api to get starred list of the user and then generates a list ordered by languages.
|
This action query the github api to get starred list of the user and then generates a list ordered by languages.
|
||||||
|
|
||||||
You can see an example of the output at my own [simonecorsi/awesome](https://github.com/simonecorsi/awesome)
|
You can see an example of the output at my own [simonecorsi/awesome](https://github.com/simonecorsi/awesome)
|
||||||
|
|
||||||
## Setup
|
## Table of Contents
|
||||||
|
|
||||||
To use this action you have to create your own repository (eg: `yourname/awesome`), then create a new empty action in it and then use the [example workflow](#example-workflow) below as a starting point.
|
<!-- toc -->
|
||||||
|
|
||||||
## Inputs
|
- [Table of Contents](#table-of-contents)
|
||||||
|
- [Documentation](#documentation)
|
||||||
|
- [Requirements](#requirements)
|
||||||
|
- [Configuration](#configuration)
|
||||||
|
- [`api-token`](#api-token)
|
||||||
|
- [Example workflow](#example-workflow)
|
||||||
|
|
||||||
### `github-token`
|
<!-- tocstop -->
|
||||||
|
|
||||||
The github workflow token is mandatory
|
## Documentation
|
||||||
|
|
||||||
### `api-token`
|
### Requirements
|
||||||
|
|
||||||
|
- An empty repository
|
||||||
|
- A personal github api key
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
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 |
|
||||||
|
|
||||||
|
#### `api-token`
|
||||||
|
|
||||||
The Personal API Access Token is mandatory to fetch stars from the API without incurring in Rate Limits.
|
The Personal API Access Token is mandatory to fetch stars from the API without incurring in Rate Limits.
|
||||||
|
|
||||||
@@ -36,8 +57,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Awesome generator
|
- name: Awesome generator
|
||||||
uses: simonecorsi/mawesome@lastest
|
uses: simonecorsi/mawesome@latest
|
||||||
with:
|
with:
|
||||||
api-token: ${{ secrets.API_TOKEN }}
|
api-token: ${{ secrets.API_TOKEN }}
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
github-email: ${{ secrets.USER_EMAIL }}
|
||||||
|
github-name: ${{ github.repository_owner }}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@@ -10,6 +10,10 @@ inputs:
|
|||||||
api-token:
|
api-token:
|
||||||
description: 'Personal API Token'
|
description: 'Personal API Token'
|
||||||
required: true
|
required: true
|
||||||
|
github-name:
|
||||||
|
description: 'Name shown in the commit'
|
||||||
|
github-email:
|
||||||
|
description: 'Email shown in the commit'
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'index.js'
|
main: 'index.js'
|
||||||
|
6
index.js
6
index.js
@@ -21308,9 +21308,11 @@ class Git {
|
|||||||
this.createTag = (tag) => this.exec(`tag -a ${tag} -m "${tag}"`);
|
this.createTag = (tag) => this.exec(`tag -a ${tag} -m "${tag}"`);
|
||||||
const githubToken = core.getInput('github-token', { required: true });
|
const githubToken = core.getInput('github-token', { required: true });
|
||||||
core.setSecret(githubToken);
|
core.setSecret(githubToken);
|
||||||
|
const githubName = core.getInput('github-name') || 'GitHub Actions';
|
||||||
|
const githubEmail = core.getInput('github-email') || 'actions@users.noreply.github.com';
|
||||||
// Set config
|
// Set config
|
||||||
this.config('user.name', 'GitHub Actions');
|
this.config('user.name', githubName);
|
||||||
this.config('user.email', 'actions@users.noreply.github.com');
|
this.config('user.email', githubEmail);
|
||||||
this.config('pull.rebase', 'false');
|
this.config('pull.rebase', 'false');
|
||||||
// Update the origin
|
// Update the origin
|
||||||
this.updateOrigin(`https://x-access-token:${githubToken}@github.com/${GITHUB_REPOSITORY}.git`);
|
this.updateOrigin(`https://x-access-token:${githubToken}@github.com/${GITHUB_REPOSITORY}.git`);
|
||||||
|
913
package-lock.json
generated
913
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mawesome",
|
"name": "mawesome",
|
||||||
"version": "1.0.30",
|
"version": "1.0.34",
|
||||||
"description": "Generate awesome list from user starred repositories",
|
"description": "Generate awesome list from user starred repositories",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "Simone Corsi<simonecorsi.dev@gmail.com>",
|
"author": "Simone Corsi<simonecorsi.dev@gmail.com>",
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"style:prettier": "prettier \"src/**/*.ts\" --list-different --write",
|
"style:prettier": "prettier \"src/**/*.ts\" --list-different --write",
|
||||||
"build": "./node_modules/.bin/ncc build src/index.ts -o ./",
|
"build": "./node_modules/.bin/ncc build src/index.ts -o ./",
|
||||||
"dev": "ts-node-dev src/index.ts",
|
"dev": "ts-node-dev src/index.ts",
|
||||||
"prerelease": "npm run build && "
|
"prerelease": "npm run build"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
@@ -37,7 +37,6 @@
|
|||||||
"@vercel/ncc": "^0.26.2",
|
"@vercel/ncc": "^0.26.2",
|
||||||
"ava": "^3.8.2",
|
"ava": "^3.8.2",
|
||||||
"benchmark": "^2.1.4",
|
"benchmark": "^2.1.4",
|
||||||
"conventional-gitlab-releaser": "^4.0.1",
|
|
||||||
"cz-conventional-changelog": "^3.2.0",
|
"cz-conventional-changelog": "^3.2.0",
|
||||||
"eslint": "^7.17.0",
|
"eslint": "^7.17.0",
|
||||||
"eslint-config-prettier": "^7.1.0",
|
"eslint-config-prettier": "^7.1.0",
|
||||||
|
@@ -11,9 +11,13 @@ class Git {
|
|||||||
const githubToken = core.getInput('github-token', { required: true });
|
const githubToken = core.getInput('github-token', { required: true });
|
||||||
core.setSecret(githubToken);
|
core.setSecret(githubToken);
|
||||||
|
|
||||||
|
const githubName = core.getInput('github-name') || 'GitHub Actions';
|
||||||
|
const githubEmail =
|
||||||
|
core.getInput('github-email') || 'actions@users.noreply.github.com';
|
||||||
|
|
||||||
// Set config
|
// Set config
|
||||||
this.config('user.name', 'GitHub Actions');
|
this.config('user.name', githubName);
|
||||||
this.config('user.email', 'actions@users.noreply.github.com');
|
this.config('user.email', githubEmail);
|
||||||
this.config('pull.rebase', 'false');
|
this.config('pull.rebase', 'false');
|
||||||
|
|
||||||
// Update the origin
|
// Update the origin
|
||||||
|
Reference in New Issue
Block a user