mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Compare commits
No commits in common. "main" and "v1.1.5" have entirely different histories.
76 changed files with 18435 additions and 3166 deletions
|
|
@ -1,5 +0,0 @@
|
||||||
/node_modules/
|
|
||||||
/dist/
|
|
||||||
/.eslintrc.js
|
|
||||||
/CHANGELOG.md
|
|
||||||
/.yarn_home
|
|
||||||
16
.eslintrc.js
16
.eslintrc.js
|
|
@ -1,16 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
"root": true,
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"plugins": [
|
|
||||||
"@typescript-eslint",
|
|
||||||
],
|
|
||||||
"extends": [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"prettier",
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"no-extra-boolean-cast": "off",
|
|
||||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
2
.gitattributes
vendored
2
.gitattributes
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
# For GitHub language statistics: https://user-images.githubusercontent.com/6702424/127756647-5ebe6dde-0903-4a02-b1e8-529046dd06f2.png
|
|
||||||
.eslintrc.js -linguist-detectable
|
|
||||||
119
.github/workflows/ci.yaml
vendored
119
.github/workflows/ci.yaml
vendored
|
|
@ -1,119 +0,0 @@
|
||||||
name: ci
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
test_lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ !github.event.created && github.repository != 'garronej/ts-ci' }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
- uses: bahmutov/npm-install@v1
|
|
||||||
- name: If this step fails run 'npm run lint' and 'npm run format' then commit again.
|
|
||||||
run: |
|
|
||||||
npm run lint:check
|
|
||||||
npm run format:check
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test_lint
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
- uses: bahmutov/npm-install@v1
|
|
||||||
- run: npm run build
|
|
||||||
- run: npm run test
|
|
||||||
|
|
||||||
check_if_version_upgraded:
|
|
||||||
name: Check if version upgrade
|
|
||||||
# When someone forks the repo and opens a PR we want to enables the tests to be run (the previous jobs)
|
|
||||||
# but obviously only us should be allowed to release.
|
|
||||||
# In the following check we make sure that we own the branch this CI workflow is running on before continuing.
|
|
||||||
# Without this check, trying to release would fail anyway because only us have the correct secret.NPM_TOKEN but
|
|
||||||
# it's cleaner to stop the execution instead of letting the CI crash.
|
|
||||||
if: |
|
|
||||||
github.event_name == 'push' ||
|
|
||||||
github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test
|
|
||||||
outputs:
|
|
||||||
from_version: ${{ steps.step1.outputs.from_version }}
|
|
||||||
to_version: ${{ steps.step1.outputs.to_version }}
|
|
||||||
is_upgraded_version: ${{ steps.step1.outputs.is_upgraded_version }}
|
|
||||||
is_pre_release: ${{steps.step1.outputs.is_pre_release }}
|
|
||||||
steps:
|
|
||||||
- uses: garronej/ts-ci@v2.1.5
|
|
||||||
id: step1
|
|
||||||
with:
|
|
||||||
action_name: is_package_json_version_upgraded
|
|
||||||
branch: ${{ github.head_ref || github.ref }}
|
|
||||||
|
|
||||||
create_github_release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# We create release only if the version in the package.json have been upgraded and this CI is running against the main branch.
|
|
||||||
# We allow branches with a PR open on main to publish pre-release (x.y.z-rc.u) but not actual releases.
|
|
||||||
if: |
|
|
||||||
needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true' &&
|
|
||||||
(
|
|
||||||
github.event_name == 'push' ||
|
|
||||||
needs.check_if_version_upgraded.outputs.is_pre_release == 'true'
|
|
||||||
)
|
|
||||||
needs:
|
|
||||||
- check_if_version_upgraded
|
|
||||||
steps:
|
|
||||||
- uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }}
|
|
||||||
tag_name: v${{ needs.check_if_version_upgraded.outputs.to_version }}
|
|
||||||
target_commitish: ${{ github.head_ref || github.ref }}
|
|
||||||
generate_release_notes: true
|
|
||||||
draft: false
|
|
||||||
prerelease: ${{ needs.check_if_version_upgraded.outputs.is_pre_release == 'true' }}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
publish_on_npm:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- create_github_release
|
|
||||||
- check_if_version_upgraded
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ github.ref }}
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
registry-url: https://registry.npmjs.org/
|
|
||||||
- uses: bahmutov/npm-install@v1
|
|
||||||
- run: npm run build
|
|
||||||
- run: npx -y -p denoify@1.6.13 enable_short_npm_import_path
|
|
||||||
env:
|
|
||||||
DRY_RUN: "0"
|
|
||||||
- uses: garronej/ts-ci@v2.1.5
|
|
||||||
with:
|
|
||||||
action_name: remove_dark_mode_specific_images_from_readme
|
|
||||||
- name: Publishing on NPM
|
|
||||||
run: |
|
|
||||||
if [ "$(npm show . version)" = "$VERSION" ]; then
|
|
||||||
echo "This version is already published"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
if [ "$NODE_AUTH_TOKEN" = "" ]; then
|
|
||||||
echo "Can't publish on NPM, You must first create a secret called NPM_TOKEN that contains your NPM auth token. https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets"
|
|
||||||
false
|
|
||||||
fi
|
|
||||||
EXTRA_ARGS=""
|
|
||||||
if [ "$IS_PRE_RELEASE" = "true" ]; then
|
|
||||||
EXTRA_ARGS="--tag next"
|
|
||||||
fi
|
|
||||||
npm publish $EXTRA_ARGS
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
||||||
VERSION: ${{ needs.check_if_version_upgraded.outputs.to_version }}
|
|
||||||
IS_PRE_RELEASE: ${{ needs.check_if_version_upgraded.outputs.is_pre_release }}
|
|
||||||
98
.github/workflows/template_initialization.yaml
vendored
98
.github/workflows/template_initialization.yaml
vendored
|
|
@ -1,98 +0,0 @@
|
||||||
name: template_initialization
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
template_initialization:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event.created && github.repository != 'garronej/ts_ci' }}
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Checking availability for module name ${{github.event.repository.name}} on NPM.
|
|
||||||
id: id1
|
|
||||||
uses: garronej/ts-ci@v2.1.5
|
|
||||||
with:
|
|
||||||
action_name: is_well_formed_and_available_module_name
|
|
||||||
module_name: ${{github.event.repository.name}}
|
|
||||||
|
|
||||||
- name: Checks results
|
|
||||||
run: |
|
|
||||||
if [ "$IS_VALID_NODE_MODULE_NAME" = "false" ]; then
|
|
||||||
echo $MODULE_NAME" is not a valid node module name"
|
|
||||||
false
|
|
||||||
fi
|
|
||||||
if [ "$IS_AVAILABLE_ON_NPM" = "false" ]; then
|
|
||||||
echo "WARNING: There is already a NPM module named "$MODULE_NAME", if you are not the owner consider picking another name"
|
|
||||||
fi
|
|
||||||
true
|
|
||||||
env:
|
|
||||||
MODULE_NAME: ${{github.event.repository.name}}
|
|
||||||
IS_VALID_NODE_MODULE_NAME: ${{steps.id1.outputs.is_valid_node_module_name}}
|
|
||||||
IS_AVAILABLE_ON_NPM: ${{steps.id1.outputs.is_available_on_npm}}
|
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- run: |
|
|
||||||
mv README.template.md README.md
|
|
||||||
mv LICENSE.template LICENSE
|
|
||||||
- name : String replace
|
|
||||||
id: id2
|
|
||||||
uses: garronej/ts-ci@v2.1.5
|
|
||||||
with:
|
|
||||||
action_name: string_replace
|
|
||||||
input_string: ${{github.event.repository.name}}
|
|
||||||
search_value: '-'
|
|
||||||
replace_value: '_'
|
|
||||||
- name: Replace tokens in README.MD and package.json
|
|
||||||
uses: cschleiden/replace-tokens@v1
|
|
||||||
with:
|
|
||||||
files: '["README.md","package.json","LICENSE","package-lock.json"]'
|
|
||||||
env:
|
|
||||||
REPO_NAME: ${{ github.event.repository.name }}
|
|
||||||
USER_OR_ORG: ${{ github.repository_owner }}
|
|
||||||
DESC: ${{ github.event.repository.description }}
|
|
||||||
REPO_NAME_NO_DASHES: ${{ steps.id2.outputs.replace_result }}
|
|
||||||
- name: Remove this workflow, it only needs to be run once.
|
|
||||||
run: rm .github/workflows/template_initialization.yaml
|
|
||||||
- name: Commit files
|
|
||||||
run: |
|
|
||||||
git config --local user.email "ts_ci@github.com"
|
|
||||||
git config --local user.name "ts_ci"
|
|
||||||
git commit -am "Replacing the template's placeholders"
|
|
||||||
- name: Push changes
|
|
||||||
uses: ad-m/github-push-action@v0.6.0
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
|
|
||||||
branch: main
|
|
||||||
|
|
||||||
debug:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.repository == 'garronej/ts_ci' }}
|
|
||||||
steps:
|
|
||||||
- name: Show envs
|
|
||||||
run: env
|
|
||||||
- name: Dump GitHub context
|
|
||||||
env:
|
|
||||||
GITHUB_CONTEXT: ${{ toJSON(github) }}
|
|
||||||
run: echo "$GITHUB_CONTEXT"
|
|
||||||
- name: Dump job context
|
|
||||||
env:
|
|
||||||
JOB_CONTEXT: ${{ toJSON(job) }}
|
|
||||||
run: echo "$JOB_CONTEXT"
|
|
||||||
- name: Dump steps context
|
|
||||||
env:
|
|
||||||
STEPS_CONTEXT: ${{ toJSON(steps) }}
|
|
||||||
run: echo "$STEPS_CONTEXT"
|
|
||||||
- name: Dump runner context
|
|
||||||
env:
|
|
||||||
RUNNER_CONTEXT: ${{ toJSON(runner) }}
|
|
||||||
run: echo "$RUNNER_CONTEXT"
|
|
||||||
- name: Dump strategy context
|
|
||||||
env:
|
|
||||||
STRATEGY_CONTEXT: ${{ toJSON(strategy) }}
|
|
||||||
run: echo "$STRATEGY_CONTEXT"
|
|
||||||
- name: Dump matrix context
|
|
||||||
env:
|
|
||||||
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
|
|
||||||
run: echo "$MATRIX_CONTEXT"
|
|
||||||
72
.gitignore
vendored
72
.gitignore
vendored
|
|
@ -1,44 +1,102 @@
|
||||||
|
# Dependency directory
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
*.log
|
*.log
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
# Runtime data
|
# Runtime data
|
||||||
pids
|
pids
|
||||||
*.pid
|
*.pid
|
||||||
*.seed
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
lib-cov
|
lib-cov
|
||||||
|
|
||||||
# Coverage directory used by tools like istanbul
|
# Coverage directory used by tools like istanbul
|
||||||
coverage
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
# nyc test coverage
|
# nyc test coverage
|
||||||
.nyc_output
|
.nyc_output
|
||||||
|
|
||||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
.grunt
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
# node-waf configuration
|
# node-waf configuration
|
||||||
.lock-wscript
|
.lock-wscript
|
||||||
|
|
||||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
build/Release
|
build/Release
|
||||||
|
|
||||||
# Dependency directories
|
# Dependency directories
|
||||||
node_modules
|
jspm_packages/
|
||||||
jspm_packages
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
# Optional npm cache directory
|
# Optional npm cache directory
|
||||||
.npm
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
# Optional REPL history
|
# Optional REPL history
|
||||||
.node_repl_history
|
.node_repl_history
|
||||||
|
|
||||||
.vscode
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
.env.test
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# next.js build output
|
||||||
|
.next
|
||||||
|
|
||||||
|
# nuxt.js build output
|
||||||
|
.nuxt
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
|
||||||
|
# OS metadata
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
/.yarn_home
|
# Ignore built ts files
|
||||||
/dist
|
__tests__/runner/*
|
||||||
|
lib/**/*
|
||||||
|
/bin
|
||||||
|
|
||||||
|
/.vscode
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
/node_modules/
|
|
||||||
/dist/
|
|
||||||
/.eslintrc.js
|
|
||||||
/docs/
|
|
||||||
/CHANGELOG.md
|
|
||||||
/.yarn_home
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"printWidth": 105,
|
|
||||||
"tabWidth": 4,
|
|
||||||
"useTabs": false,
|
|
||||||
"semi": true,
|
|
||||||
"singleQuote": false,
|
|
||||||
"quoteProps": "preserve",
|
|
||||||
"trailingComma": "none",
|
|
||||||
"bracketSpacing": true,
|
|
||||||
"arrowParens": "avoid"
|
|
||||||
}
|
|
||||||
21
LICENSE
21
LICENSE
|
|
@ -1,21 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2020 Joseph Garrone
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2020 GitHub user u/#{USER_OR_ORG}#
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
257
README.md
257
README.md
|
|
@ -1,234 +1,35 @@
|
||||||
<p align="center">
|
|
||||||
<img width="350" src="https://user-images.githubusercontent.com/6702424/109354825-ab4b8e00-787e-11eb-8336-6009415ecaf6.png">
|
|
||||||
</p>
|
|
||||||
<p align="center">
|
|
||||||
<i> 🚀 A starter project for module publisher! 🚀</i>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Have you written some functions or React component that you're proud of? Do you want to share it as a standalone module on NPM,
|
# github_actions_toolkit
|
||||||
but find yourself unsure about the publishing process or how to manage the lifecycle of an open-source library?
|
|
||||||
|
|
||||||
Look no further - ts-ci is here to jumpstart your journey towards becoming a proficient NPM module author.
|
```bash
|
||||||
|
npm install
|
||||||
Main selling points:
|
npm run build
|
||||||
|
|
||||||
- Unlike traditional CLI tools, `ts-ci` utilizes automation within Github Actions. Simply update your `package.json` version number and push. Your new version is automatically published on NPM.
|
|
||||||
- It doesn't bundle your library into a single file. Instead, users can cherry-pick imports from your library, enabling tree shaking. For instance: `import { aSpecificFunction } from "your-module/aSpecificFile"`.
|
|
||||||
- It's just a starting point. It provides a good default CI workflow that you can adapt to your needs.
|
|
||||||
|
|
||||||
https://user-images.githubusercontent.com/6702424/197344513-065246b9-8823-4894-a9a7-6c539da10655.mp4
|
|
||||||
|
|
||||||
# Examples of project using this template
|
|
||||||
|
|
||||||
- [Keycloakify](https://github.com/garronej/keycloakify)
|
|
||||||
- [Denoify](https://github.com/garronej/denoify)
|
|
||||||
- [tss-react](https://github.com/garronej/tss-react)
|
|
||||||
- [EVT](https://github.com/garronej/evt)
|
|
||||||
- [i18nifty](https://github.com/etalab/i18nifty)
|
|
||||||
- [oidc-spa](https://github.com/keycloakify/oidc-spa)
|
|
||||||
- [vite-envs](https://github.com/garronej/vite-envs)
|
|
||||||
|
|
||||||
# How to use
|
|
||||||
|
|
||||||
> 🗣️ Since a recent GitHub update you need to manually allow GitHub Action to push on your repo.
|
|
||||||
> Fo this reason the initial setup will fail.
|
|
||||||
> You need to enabled permission and re-run failed job: [see video](https://user-images.githubusercontent.com/6702424/213480604-0aac0ea7-487f-491d-94ae-df245b2c7ee8.mov)
|
|
||||||
|
|
||||||
- Click on 
|
|
||||||
- The repo name you will choose will be used as a module name for NPM.
|
|
||||||
- Go to the repository ``Settings`` tab, then ``Secrets`` you will need to add a new secret:
|
|
||||||
``NPM_TOKEN``, you NPM authorization token.
|
|
||||||
- To trigger publishing edit the ``package.json`` ``version`` field ( ``0.0.0``-> ``0.0.1`` for example) then push changes... that's all !
|
|
||||||
- Publish pre-release by setting your version number to `X.Y.Z-rc.U` (example: `1.0.0-rc.32`). On NPM the version will be tagged `next`.
|
|
||||||
- The CI runs on `main` and on the branches that have a PR open on `main` (You can publish pre-release from branches this way).
|
|
||||||
|
|
||||||
# Features
|
|
||||||
|
|
||||||
- ✍️ Assists in completing the `package.json` details.
|
|
||||||
- ✅ Runs your test across various OSes and Node version combinations. [Reference](https://github.com/garronej/ts-ci/blob/4e0b7980315a5156de33c1a4f44907f382bbc862/.github/workflows/ci.yaml#L26-L29). Note: This might be overkill for most use-cases. Feel free to modify the matrix as per your needs.
|
|
||||||
- 📦 Supports publishing on NPM along with creating corresponding GitHub releases.
|
|
||||||
- 🧪 Enables testing of your local module copy in your application before publishing it on NPM.
|
|
||||||
- 🌗 Offers flexibility to use different repository images for dark and light modes. For instance, check out [i18nifty](https://github.com/etalab/i18nifty): [Light](https://user-images.githubusercontent.com/6702424/200299948-94bacf9d-381e-40f8-b9a3-8e726bcd37c5.png) and [Dark](https://user-images.githubusercontent.com/6702424/200299807-42388349-a5ae-44b2-abd1-0aa538b58da2.png). For implementation details, see [here](https://github.com/etalab/i18nifty/blob/f6ad7bb11514224a416158af7af8e4073c7932c1/README.md?plain=1#L1-L11). TS-CI also provides [an additional action](https://github.com/garronej/ts-ci/blob/09916b317c55a04dbf2fc036d7343cd6c6756cc6/.github/workflows/ci.yaml#L105-L107) that removes the dark mode specific image from your README.md before [publishing on NPM](https://www.npmjs.com/package/i18nifty), as NPM does not yet support the `#gh-dark-mode-only` syntax.
|
|
||||||
- 🩳 By default, TS-CI incorporates [a step in the workflow](https://github.com/garronej/ts-ci/blob/09916b317c55a04dbf2fc036d7343cd6c6756cc6/.github/workflows/ci.yaml#L102) that relocates your distribution files to the root directory before releasing, allowing your users to import specific files from your module as `import {...} from "my_module/theFile"` rather than "my_module/**dist**/theFile". If you dislike this behavior or if you only have an index.ts file and do not intend for users to selectively import from your module, you may remove [this action](https://github.com/garronej/ts-ci/blob/09916b317c55a04dbf2fc036d7343cd6c6756cc6/.github/workflows/ci.yaml#L102).
|
|
||||||
- ⚙️ ESlint and Prettier are automatically triggered against files staged for commit. Despite what [t3dotgg](https://github.com/t3dotgg) says, it's the correct way of doing it,
|
|
||||||
that being said, this feature is optional and can be [disabled](https://github.com/garronej/ts-ci/blob/8da207622e51a248542cf013707198cd7cad1d09/README.md?plain=1#L87-L91) if desired.
|
|
||||||
|
|
||||||
# Release in CJS, ESM or both (but don't bundle!)
|
|
||||||
|
|
||||||
Contrary to what other guides or project starters may suggest, you don't need to bundle your library (or in other words you don't need to use Vite/Rollup),
|
|
||||||
nor do you need to fragment your modules into smaller, independently published units on NPM under the `packages/` directory for your module
|
|
||||||
to be tree-shakable (e.g., `@your-module/submodule1`, `@your-module/submodule2`).
|
|
||||||
|
|
||||||
When you bundle your library, you incorporate __all your dependencies__ into the `.js` code you distribute. This could potentially lead to duplication of dependencies.
|
|
||||||
|
|
||||||
For instance, if your library depends on the [classnames](https://www.npmjs.com/package/classnames) package, the entirety of `classnames` source code will be included in your bundle. Subsequently, if a user of your library is also directly using `classnames`, there will be two copies of `classnames` in their final application bundle.
|
|
||||||
|
|
||||||
Another disadvantage of bundling is the lack of selective importing. For example, if a user wishes to import only a specific component or functionality from your module, they would be unable to do so. Instead, they are required to import the entire library.
|
|
||||||
|
|
||||||
Publishing independent units on NPM under the `packages/` directory (e.g., `@your-module/submodule1`, `@your-module/submodule2`) is a common practice, but it's not necessarily a beneficial one. The first reason against this approach is that once you comprehend the fact that bundling isn't necessary, persisting with this process becomes somewhat pointless. The second reason concerns your users, who are then burdened with the responsibility of individually installing and synchronizing the various components' versions. This could cause potential inconsistencies and compatibility issues, making the user experience less efficient and potentially more troublesome.
|
|
||||||
|
|
||||||
The reality is much simpler. The responsibility of bundling lies with the final application; your role involves merely
|
|
||||||
publishing types declaration (`.d.ts`) and the correct flavor of JavaScript files, which are the output of `tsc`.
|
|
||||||
|
|
||||||
That's all there is to it!
|
|
||||||
|
|
||||||
## CJS only (default)
|
|
||||||
|
|
||||||
By default your module release [in CommonJS (CJS)](https://github.com/garronej/ts-ci/blob/8390339b52c98cdbd458d4b945286f999358a1ff/tsconfig.json#L3).
|
|
||||||
|
|
||||||
You want to avoid this strategy if:
|
|
||||||
- You make use of async imports (`import(...).then(...))`).
|
|
||||||
- You want your module to be usable in node `type: module` mode *AND* you have some `export default` (if you don't have export default it will work just fine).
|
|
||||||
- Your lib will be use by Angular, if you only provide CJS you'll get warnings like
|
|
||||||
"CommonJS or AMD dependencies can cause optimization bailouts."
|
|
||||||
- Your lib is a libraries of utilities (like [tsafe](https://github.com/garronej/tsafe)) and you would
|
|
||||||
like to prevent your user from having to cherry pick what they import like: `import { assert } from "tsafe/assert"; import { is } from "tsafe/is";...` and instead enable automatic three shaking when they import
|
|
||||||
`import { assert, is } from "tsafe";`.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## ESM only
|
|
||||||
|
|
||||||
If you want to **only** release as ESM just set `"module": "ES2020"` in your `tsconfig.json`, you also probably want to set `"target": "ES2017"`.
|
|
||||||
You can remove [the listing of your export](https://github.com/garronej/ts-ci/blob/16dbde73a52ea7750a39f0179f121dd8927c1ee5/package.json#L21-L25) in the package.json it's not of any use.
|
|
||||||
This option has the advantage, if you are publishing a React library, to enable you to import assets file (`.svg`, `.css`) like for example [here](https://github.com/codegouvfr/react-dsfr/blob/459f2a8f8c4de054217628e281c97520ac9889de/src/AgentConnectButton.tsx#L7-L10) (Don't forget to copy your the assets from your `src/` to your `dist/` though, TypeScript don't do it for you).
|
|
||||||
|
|
||||||
You want to avoid this strategy if:
|
|
||||||
- You want your module to be usable with node. The ESM distribution produced by TypeScript is an ESM distribution
|
|
||||||
that node in `type: module` can't process (files need to have `.mjs` extension, exports need to be listed).
|
|
||||||
As a result your module won't be usable at all on node except through Next.js that will be able to make it work.
|
|
||||||
Note that it will work out of the box in Next.js setup using [the AppDir router](https://nextjs.org/docs/app/building-your-application/routing)
|
|
||||||
but for project using the legacy [pagesRouter](https://nextjs.org/docs/pages/building-your-application/routing) your user will have to add
|
|
||||||
`transpilePackages: ["<your-module>"]` in their `next.config.js` file. [Example](https://github.com/garronej/react-dsfr-next-demo/blob/70ca68eebe326fab73f8cbd41a9f0c0bb2f15e8a/next.config.js#L14).
|
|
||||||
This means also that you'd have to tell your users to configure their JEST so that it transpiles your module
|
|
||||||
using `"transformIgnorePatterns": [ "node_modules/(?!@codegouvfr/react-dsfr)" ]`.
|
|
||||||
If you publish scripts (your `package.json` has a `bin` property) you'll need to [transpile your script separately in CJS](https://github.com/garronej/ts-ci/issues/1#issuecomment-1556046899).
|
|
||||||
|
|
||||||
## ESM for bundlers (browser) + CJS for node.
|
|
||||||
|
|
||||||
- Have a `tsconfig.json` that targets CSM (as by default): [example](https://github.com/garronej/tss-react/blob/main/tsconfig.json)
|
|
||||||
- Perform two build, one for CJS, one for ESM. [example](https://github.com/garronej/tss-react/blob/3cab4732edaff7ba41e3f01b7524b8db47cf7f25/package.json#L43)
|
|
||||||
- Explicitly list your exports in your `package.json`, use `"module"`, the condition for bundlers like Vite or Next.js,
|
|
||||||
`"default"` is what will be picked up by node. [example](https://github.com/garronej/tss-react/blob/52ee92df56ef9fc82c0608deb4c35944b82b7b74/package.json#L11-L52).
|
|
||||||
|
|
||||||
You want to avoid this strategy if:
|
|
||||||
- You use `export default` and you want to support node in `type: module` mode.
|
|
||||||
- You have lazy import (`import(...).then(...)`) and you want them to be lazy not only on the browser but on node too.
|
|
||||||
- You want automatic tree shaking when importing from index (see explanation above)
|
|
||||||
- Your package is susceptible to be a peer dependency, you can end up with duplication.
|
|
||||||
|
|
||||||
## Deno
|
|
||||||
|
|
||||||
Regardless of the scenario you opt for you can always release for Deno using [Denoify](https://denoify.dev).
|
|
||||||
|
|
||||||
## CJS + A real ESM distribution, fully compliant with the standard
|
|
||||||
|
|
||||||
Pursuing a fully compliant CJS + ESM distribution comes with caveats. It only works well if all your dependencies are adherent to the standard, a condition that [most modules fail to meet](https://github.com/mui/material-ui/issues/37335).
|
|
||||||
|
|
||||||
This method introduces the risk of your package being simultaneously loaded in both CJS and ESM in a single node application. It also poses a similar risk to your dependencies.
|
|
||||||
|
|
||||||
Thus, proceed with this option only if it's necessary for your lazy imports to actually be lazy when your code runs on Node and you want to be able to have tree shaking.
|
|
||||||
This approach is only risk free if you are not susceptible to be a peer dependency and you have no dependency.
|
|
||||||
|
|
||||||
- To transpile in ESM using `tsc`, use [`js2mjs`](https://github.com/garronej/js2mjs) and [`ts-add-js-extension`](https://www.npmjs.com/package/ts-add-js-extension) to create a fully compliant ESM distribution. See example [here with tsafe](https://github.com/garronej/tsafe/blob/f97578296b996c7244866087e19877f6cc5cdea5/package.json#L10-L12). (Side note: [An external script should not be required for this!](https://github.com/microsoft/TypeScript/issues/18442)).
|
|
||||||
- Declare your exports using both `require` and `import`. See example with [the package.js of tsafe](https://www.npmjs.com/package/tsafe?activeTab=code).
|
|
||||||
|
|
||||||
## I have questions
|
|
||||||
|
|
||||||
If you find your self thinking:
|
|
||||||
|
|
||||||
"I don't know man, ESM, CJS, I have no idea, I just want my stuff to work!"
|
|
||||||
"None of the option above covers all my requirement?"
|
|
||||||
"Why can't I have a solution that work in every case?"
|
|
||||||
"Why can't I publish an actual standard compliant ESM distribution?"
|
|
||||||
|
|
||||||
Just [start a discussion](https://github.com/garronej/ts-ci/discussions) or hit [my Twitter DM](https://twitter.com/GarroneJoseph) I'll be happy to provide further guidance.
|
|
||||||
|
|
||||||
# FAQ
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Click to expand</summary>
|
|
||||||
|
|
||||||
## Can I use `npm` (or something else) instead of `yarn`
|
|
||||||
|
|
||||||
Yes, just remove the `yarn.lock` file and edit `.github/workflows/ci.yaml`, replace all `yarn ***` by `npm run ****`.
|
|
||||||
Note however that the the script (`scripts/link-in-app.ts`) that enable you to test in an external app will no longer work.
|
|
||||||
|
|
||||||
## What will be included in the npm bundle?
|
|
||||||
|
|
||||||
All filles listed in [the files property of your package JSON](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/package.json#L35-L41).
|
|
||||||
|
|
||||||
|
|
||||||
## How to debug the action
|
|
||||||
|
|
||||||
You can increase the verbosity by creating a new secret `ACTIONS_STEP_DEBUG` and setting it to true.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Disable linting and formatting
|
|
||||||
|
|
||||||
Remove [this](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/package.json#L15-L18), [this](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/package.json#L20-L32) and [this](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/package.json#L47-L53) from your `package.json`
|
|
||||||
Remove [this](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/.github/workflows/ci.yaml#L12-L26) and [this](https://github.com/garronej/ts_ci/blob/974054f2b83f8170317f2b2fa60b5f78e9336c0b/.github/workflows/ci.yaml#L29) from `github/workflows/ci.yaml`
|
|
||||||
Remove `.eslintignore`, `.eslintrc.js`, `.prettierignore` and `.prettierrc.json`.
|
|
||||||
|
|
||||||
## Accessing files outside the ``dist/`` directory (when [this line is present in your repo](https://github.com/garronej/ts-ci/blob/eabbcfa5b22777c6b051206d8f4e2c8a8624c853/.github/workflows/ci.yaml#L100))
|
|
||||||
|
|
||||||
The drawback of having short import path is that the dir structure
|
|
||||||
is not exactly the same in production ( in the npm bundle ) and in development.
|
|
||||||
|
|
||||||
The files and directories in ``dist/`` will be moved to the root of the project.
|
|
||||||
|
|
||||||
As a result this won't work in production:
|
|
||||||
|
|
||||||
``src/index.ts``
|
|
||||||
```typescript
|
|
||||||
import * as fs from "fs";
|
|
||||||
import * as path from "path";
|
|
||||||
|
|
||||||
const str = fs.readFileSync(
|
|
||||||
path.join(__dirname,"..", "package.json")
|
|
||||||
).toString("utf8");
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Because ``/dist/index.js`` will be moved to ``/index.js``
|
Example use:
|
||||||
|
```yaml
|
||||||
You'll have to do:
|
trigger-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
``src/index.ts``
|
if: steps.id1.outputs.is_version_changed && github.event_name == 'push'
|
||||||
```typescript
|
needs:
|
||||||
import * as fs from "fs";
|
- test-node
|
||||||
import * as path from "path";
|
- test-deno
|
||||||
import { getProjectRoot } from "./tools/getProjectRoot";
|
steps:
|
||||||
|
- name: Check if package.json version have changed
|
||||||
const str = fs.readFileSync(
|
id: id1
|
||||||
path.join(getProjectRoot(),"package.json")
|
uses: garronej/github_actions_toolkit@master
|
||||||
).toString("utf8");
|
with:
|
||||||
|
action_name: is_version_changed
|
||||||
|
owner: ${{github.repository_owner}}
|
||||||
|
repo: ${{github.repository.name}}
|
||||||
|
branch_current: ${{master}}
|
||||||
|
branch_new: ${{dev}}
|
||||||
|
- name: Trigger publish if version changed
|
||||||
|
uses: garronej/github_actions_toolkit@master
|
||||||
|
with:
|
||||||
|
action_name: dispatch_event
|
||||||
|
owner: ${{github.repository_owner}}
|
||||||
|
repo: ${{github.repository.name}}
|
||||||
|
event_type: publish
|
||||||
```
|
```
|
||||||
|
|
||||||
With `getProjectRoot.ts` being:
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import * as fs from "fs";
|
|
||||||
import * as path from "path";
|
|
||||||
|
|
||||||
function getProjectRootRec(dirPath: string): string {
|
|
||||||
if (fs.existsSync(path.join(dirPath, "package.json"))) {
|
|
||||||
return dirPath;
|
|
||||||
}
|
|
||||||
return getProjectRootRec(path.join(dirPath, ".."));
|
|
||||||
}
|
|
||||||
|
|
||||||
let result: string | undefined = undefined;
|
|
||||||
|
|
||||||
export function getProjectRoot(): string {
|
|
||||||
if (result !== undefined) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (result = getProjectRootRec(__dirname));
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
<p align="center">
|
|
||||||
<img src="https://user-images.githubusercontent.com/6702424/80216211-00ef5280-863e-11ea-81de-59f3a3d4b8e4.png">
|
|
||||||
</p>
|
|
||||||
<p align="center">
|
|
||||||
<i>#{DESC}#</i>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<a href="https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#/actions">
|
|
||||||
<img src="https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#/actions/workflows/ci.yaml/badge.svg?branch=main">
|
|
||||||
</a>
|
|
||||||
<a href="https://bundlephobia.com/package/#{REPO_NAME}#">
|
|
||||||
<img src="https://img.shields.io/bundlephobia/minzip/#{REPO_NAME}#">
|
|
||||||
</a>
|
|
||||||
<a href="https://www.npmjs.com/package/#{REPO_NAME}#">
|
|
||||||
<img src="https://img.shields.io/npm/dw/#{REPO_NAME}#">
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#/blob/main/LICENSE">
|
|
||||||
<img src="https://img.shields.io/npm/l/#{REPO_NAME}#">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#">Home</a>
|
|
||||||
-
|
|
||||||
<a href="https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#">Documentation</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
# Install / Import
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ npm install --save #{REPO_NAME}#
|
|
||||||
```
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { myFunction, myObject, MyReactComponent } from "#{REPO_NAME}#";
|
|
||||||
```
|
|
||||||
|
|
||||||
Specific imports, only import what you need:
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { myFunction } from "#{REPO_NAME}#/myFunction";
|
|
||||||
import { myObject } from "#{REPO_NAME}#/myObject";
|
|
||||||
import MyReactComponent from "#{REPO_NAME}#/MyReactComponent";
|
|
||||||
```
|
|
||||||
|
|
||||||
# Contributing
|
|
||||||
|
|
||||||
## Testing your changes in an external app
|
|
||||||
|
|
||||||
You have made some changes to the code and you want to test them
|
|
||||||
in your app before submitting a pull request?
|
|
||||||
|
|
||||||
Assuming `you/my-app` have `#{REPO_NAME}#` as a dependency.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd ~/github
|
|
||||||
git clone https://github.com/you/my-app
|
|
||||||
cd my-app
|
|
||||||
yarn
|
|
||||||
|
|
||||||
cd ~/github
|
|
||||||
git clone https://github.com/garronej/#{REPO_NAME}#
|
|
||||||
cd #{REPO_NAME}#
|
|
||||||
yarn
|
|
||||||
yarn build
|
|
||||||
yarn link-in-app my-app
|
|
||||||
npx tsc -w
|
|
||||||
|
|
||||||
# Open another terminal
|
|
||||||
|
|
||||||
cd ~/github/my-app
|
|
||||||
rm -rf node_modules/.cache
|
|
||||||
yarn start # Or whatever my-app is using for starting the project
|
|
||||||
```
|
|
||||||
|
|
||||||
You don't have to use `~/github` as reference path. Just make sure `my-app` and `#{REPO_NAME}#`
|
|
||||||
are in the same directory.
|
|
||||||
|
|
||||||
> Note for the maintainer: You might run into issues if you do not list all your singleton dependencies in
|
|
||||||
> `src/link-in-app.js -> singletonDependencies`. A singleton dependency is a dependency that can
|
|
||||||
> only be present once in an App. Singleton dependencies are usually listed as peerDependencies example `react`, `@emotion/*`.
|
|
||||||
|
|
||||||
## Releasing
|
|
||||||
|
|
||||||
For releasing a new version on GitHub and NPM you don't need to create a tag.
|
|
||||||
Just update the `package.json` version number and push.
|
|
||||||
|
|
||||||
For publishing a release candidate update your `package.json` with `1.3.4-rc.0` (`.1`, `.2`, ...).
|
|
||||||
It also work if you do it from a branch that have an open PR on main.
|
|
||||||
|
|
||||||
> Make sure your have defined the `NPM_TOKEN` repository secret or NPM publishing will fail.
|
|
||||||
84
action.yml
Normal file
84
action.yml
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
name: 'github_actions_toolkit'
|
||||||
|
description: 'A collection of github actions'
|
||||||
|
author: 'u/garronej'
|
||||||
|
inputs:
|
||||||
|
action_name:
|
||||||
|
required: true
|
||||||
|
description: 'Action to run, one of: "get_package_json_version", "dispatch_event", "update_changelog", "sync_package_and_package_lock_version", "setup_repo_webhook_for_deno_land_publishing", "is_well_formed_and_available_module_name", "string_replace", "tell_if_project_uses_npm_or_yarn", "is_package_json_version_upgraded"'
|
||||||
|
owner:
|
||||||
|
required: false
|
||||||
|
description: 'Repository owner, example: ''garronej'',github.repository_owner'
|
||||||
|
default: '${{github.repository_owner}}'
|
||||||
|
repo:
|
||||||
|
required: false
|
||||||
|
description: 'Repository name, example: ''evt'', github.event.repository.name'
|
||||||
|
default: '${{github.event.repository.name}}'
|
||||||
|
event_type:
|
||||||
|
required: false
|
||||||
|
description: 'see: https://developer.github.com/v3/repos/#create-a-repository-dispatch-event'
|
||||||
|
client_payload_json:
|
||||||
|
required: false
|
||||||
|
description: 'Example ''{"p":"foo"}'' see: https://developer.github.com/v3/repos/#create-a-repository-dispatch-event'
|
||||||
|
branch:
|
||||||
|
required: false
|
||||||
|
description: 'Example: default ( can also be a sha )'
|
||||||
|
default: '${{ github.sha }}'
|
||||||
|
exclude_commit_from_author_names_json:
|
||||||
|
required: false
|
||||||
|
description: 'For update_changelog, do not includes commit from user certain committer in the CHANGELOG.md, ex: ''["denoify_ci"]'''
|
||||||
|
default: '["actions"]'
|
||||||
|
module_name:
|
||||||
|
required: false
|
||||||
|
description: 'A candidate module name, Example: lodash'
|
||||||
|
compare_to_version:
|
||||||
|
required: false
|
||||||
|
description: 'For get_package_json_version, a version against which comparing the result if found version more recent than compare_to_version compare_result is 1 if found version is equal to compare_to_version compare_result is 0 if found version is older to compare_to_version compare_result -1 Example: 0.1.3'
|
||||||
|
input_string:
|
||||||
|
required: false
|
||||||
|
description: 'For string_replace, the string to replace'
|
||||||
|
search_value:
|
||||||
|
required: false
|
||||||
|
description: 'For string_replace, Example ''-'' ( Will be used as arg for RegExp constructor )'
|
||||||
|
replace_value:
|
||||||
|
required: false
|
||||||
|
description: 'For string_replace, Example ''_'''
|
||||||
|
should_webhook_be_enabled:
|
||||||
|
required: false
|
||||||
|
description: 'true|false, Should the create webhook be enabled, with setup_repo_webhook_for_deno_land_publishing'
|
||||||
|
default: 'true'
|
||||||
|
github_token:
|
||||||
|
required: false
|
||||||
|
description: 'GitHub Personal access token'
|
||||||
|
default: '${{ github.token }}'
|
||||||
|
outputs:
|
||||||
|
version:
|
||||||
|
description: 'Output of get_package_json_version'
|
||||||
|
is_valid_node_module_name:
|
||||||
|
description: 'true|false'
|
||||||
|
is_valid_deno_module_name:
|
||||||
|
description: 'true|false'
|
||||||
|
is_available_on_npm:
|
||||||
|
description: 'true|false'
|
||||||
|
is_available_on_deno_land:
|
||||||
|
description: 'true|false'
|
||||||
|
was_already_published:
|
||||||
|
description: 'true|false'
|
||||||
|
compare_result:
|
||||||
|
description: '1|0|-1'
|
||||||
|
replace_result:
|
||||||
|
description: 'Output of string_replace'
|
||||||
|
was_hook_created:
|
||||||
|
description: 'true|false'
|
||||||
|
npm_or_yarn:
|
||||||
|
description: 'npm|yarn'
|
||||||
|
from_version:
|
||||||
|
description: 'Output of is_package_json_version_upgraded, string'
|
||||||
|
to_version:
|
||||||
|
description: 'Output of is_package_json_version_upgraded, string'
|
||||||
|
is_upgraded_version:
|
||||||
|
description: 'Output of is_package_json_version_upgraded, true|false'
|
||||||
|
is_release_beta:
|
||||||
|
description: 'Output of is_package_json_version_upgraded, true|false'
|
||||||
|
runs:
|
||||||
|
using: 'node12'
|
||||||
|
main: 'dist/index.js'
|
||||||
12971
dist/index.js
vendored
Normal file
12971
dist/index.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
836
package-lock.json
generated
Normal file
836
package-lock.json
generated
Normal file
|
|
@ -0,0 +1,836 @@
|
||||||
|
{
|
||||||
|
"name": "github_actions_toolkit",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@actions/core": {
|
||||||
|
"version": "1.2.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
|
||||||
|
"integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
|
||||||
|
},
|
||||||
|
"@jest/types": {
|
||||||
|
"version": "24.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz",
|
||||||
|
"integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/istanbul-lib-coverage": "^2.0.0",
|
||||||
|
"@types/istanbul-reports": "^1.1.1",
|
||||||
|
"@types/yargs": "^13.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@octokit/auth-token": {
|
||||||
|
"version": "2.4.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz",
|
||||||
|
"integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/types": "^6.0.3"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": {
|
||||||
|
"version": "6.12.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.12.2.tgz",
|
||||||
|
"integrity": "sha512-kCkiN8scbCmSq+gwdJV0iLgHc0O/GTPY1/cffo9kECu1MvatLPh9E+qFhfRIktKfHEA6ZYvv6S1B4Wnv3bi3pA==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/openapi-types": "^5.3.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@octokit/core": {
|
||||||
|
"version": "2.5.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-2.5.4.tgz",
|
||||||
|
"integrity": "sha512-HCp8yKQfTITYK+Nd09MHzAlP1v3Ii/oCohv0/TW9rhSLvzb98BOVs2QmVYuloE6a3l6LsfyGIwb6Pc4ycgWlIQ==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/auth-token": "^2.4.0",
|
||||||
|
"@octokit/graphql": "^4.3.1",
|
||||||
|
"@octokit/request": "^5.4.0",
|
||||||
|
"@octokit/types": "^5.0.0",
|
||||||
|
"before-after-hook": "^2.1.0",
|
||||||
|
"universal-user-agent": "^5.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@octokit/endpoint": {
|
||||||
|
"version": "6.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.11.tgz",
|
||||||
|
"integrity": "sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/types": "^6.0.3",
|
||||||
|
"is-plain-object": "^5.0.0",
|
||||||
|
"universal-user-agent": "^6.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": {
|
||||||
|
"version": "6.12.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.12.2.tgz",
|
||||||
|
"integrity": "sha512-kCkiN8scbCmSq+gwdJV0iLgHc0O/GTPY1/cffo9kECu1MvatLPh9E+qFhfRIktKfHEA6ZYvv6S1B4Wnv3bi3pA==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/openapi-types": "^5.3.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"universal-user-agent": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@octokit/graphql": {
|
||||||
|
"version": "4.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.1.tgz",
|
||||||
|
"integrity": "sha512-2lYlvf4YTDgZCTXTW4+OX+9WTLFtEUc6hGm4qM1nlZjzxj+arizM4aHWzBVBCxY9glh7GIs0WEuiSgbVzv8cmA==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/request": "^5.3.0",
|
||||||
|
"@octokit/types": "^6.0.3",
|
||||||
|
"universal-user-agent": "^6.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": {
|
||||||
|
"version": "6.12.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.12.2.tgz",
|
||||||
|
"integrity": "sha512-kCkiN8scbCmSq+gwdJV0iLgHc0O/GTPY1/cffo9kECu1MvatLPh9E+qFhfRIktKfHEA6ZYvv6S1B4Wnv3bi3pA==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/openapi-types": "^5.3.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"universal-user-agent": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@octokit/openapi-types": {
|
||||||
|
"version": "5.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-5.3.2.tgz",
|
||||||
|
"integrity": "sha512-NxF1yfYOUO92rCx3dwvA2onF30Vdlg7YUkMVXkeptqpzA3tRLplThhFleV/UKWFgh7rpKu1yYRbvNDUtzSopKA=="
|
||||||
|
},
|
||||||
|
"@octokit/plugin-paginate-rest": {
|
||||||
|
"version": "2.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.11.0.tgz",
|
||||||
|
"integrity": "sha512-7L9xQank2G3r1dGqrVPo1z62V5utbykOUzlmNHPz87Pww/JpZQ9KyG5CHtUzgmB4n5iDRKYNK/86A8D98HP0yA==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/types": "^6.11.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": {
|
||||||
|
"version": "6.12.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.12.2.tgz",
|
||||||
|
"integrity": "sha512-kCkiN8scbCmSq+gwdJV0iLgHc0O/GTPY1/cffo9kECu1MvatLPh9E+qFhfRIktKfHEA6ZYvv6S1B4Wnv3bi3pA==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/openapi-types": "^5.3.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@octokit/plugin-request-log": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ=="
|
||||||
|
},
|
||||||
|
"@octokit/plugin-rest-endpoint-methods": {
|
||||||
|
"version": "3.17.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-3.17.0.tgz",
|
||||||
|
"integrity": "sha512-NFV3vq7GgoO2TrkyBRUOwflkfTYkFKS0tLAPym7RNpkwLCttqShaEGjthOsPEEL+7LFcYv3mU24+F2yVd3npmg==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/types": "^4.1.6",
|
||||||
|
"deprecation": "^2.3.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": {
|
||||||
|
"version": "4.1.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-4.1.10.tgz",
|
||||||
|
"integrity": "sha512-/wbFy1cUIE5eICcg0wTKGXMlKSbaAxEr00qaBXzscLXpqhcwgXeS6P8O0pkysBhRfyjkKjJaYrvR1ExMO5eOXQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": ">= 8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@octokit/request": {
|
||||||
|
"version": "5.4.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.14.tgz",
|
||||||
|
"integrity": "sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/endpoint": "^6.0.1",
|
||||||
|
"@octokit/request-error": "^2.0.0",
|
||||||
|
"@octokit/types": "^6.7.1",
|
||||||
|
"deprecation": "^2.0.0",
|
||||||
|
"is-plain-object": "^5.0.0",
|
||||||
|
"node-fetch": "^2.6.1",
|
||||||
|
"once": "^1.4.0",
|
||||||
|
"universal-user-agent": "^6.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": {
|
||||||
|
"version": "6.12.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.12.2.tgz",
|
||||||
|
"integrity": "sha512-kCkiN8scbCmSq+gwdJV0iLgHc0O/GTPY1/cffo9kECu1MvatLPh9E+qFhfRIktKfHEA6ZYvv6S1B4Wnv3bi3pA==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/openapi-types": "^5.3.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"universal-user-agent": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@octokit/request-error": {
|
||||||
|
"version": "2.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.5.tgz",
|
||||||
|
"integrity": "sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/types": "^6.0.3",
|
||||||
|
"deprecation": "^2.0.0",
|
||||||
|
"once": "^1.4.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": {
|
||||||
|
"version": "6.12.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.12.2.tgz",
|
||||||
|
"integrity": "sha512-kCkiN8scbCmSq+gwdJV0iLgHc0O/GTPY1/cffo9kECu1MvatLPh9E+qFhfRIktKfHEA6ZYvv6S1B4Wnv3bi3pA==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/openapi-types": "^5.3.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@octokit/rest": {
|
||||||
|
"version": "17.11.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-17.11.2.tgz",
|
||||||
|
"integrity": "sha512-4jTmn8WossTUaLfNDfXk4fVJgbz5JgZE8eCs4BvIb52lvIH8rpVMD1fgRCrHbSd6LRPE5JFZSfAEtszrOq3ZFQ==",
|
||||||
|
"requires": {
|
||||||
|
"@octokit/core": "^2.4.3",
|
||||||
|
"@octokit/plugin-paginate-rest": "^2.2.0",
|
||||||
|
"@octokit/plugin-request-log": "^1.0.0",
|
||||||
|
"@octokit/plugin-rest-endpoint-methods": "3.17.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@octokit/types": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": ">= 8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/glob": {
|
||||||
|
"version": "7.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz",
|
||||||
|
"integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/minimatch": "*",
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/istanbul-lib-coverage": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/istanbul-lib-report": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/istanbul-lib-coverage": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/istanbul-reports": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/istanbul-lib-coverage": "*",
|
||||||
|
"@types/istanbul-lib-report": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/jest": {
|
||||||
|
"version": "24.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.9.1.tgz",
|
||||||
|
"integrity": "sha512-Fb38HkXSVA4L8fGKEZ6le5bB8r6MRWlOCZbVuWZcmOMSCd2wCYOwN1ibj8daIoV9naq7aaOZjrLCoCMptKU/4Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"jest-diff": "^24.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/minimatch": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/node": {
|
||||||
|
"version": "12.20.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.5.tgz",
|
||||||
|
"integrity": "sha512-5Oy7tYZnu3a4pnJ//d4yVvOImExl4Vtwf0D40iKUlU+XlUsyV9iyFWyCFlwy489b72FMAik/EFwRkNLjjOdSPg=="
|
||||||
|
},
|
||||||
|
"@types/node-fetch": {
|
||||||
|
"version": "2.5.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.8.tgz",
|
||||||
|
"integrity": "sha512-fbjI6ja0N5ZA8TV53RUqzsKNkl9fv8Oj3T7zxW7FGv1GSH7gwJaNF8dzCjrqKaxKeUpTz4yT1DaJFq/omNpGfw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*",
|
||||||
|
"form-data": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/validate-npm-package-name": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/validate-npm-package-name/-/validate-npm-package-name-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-7ohzD2fh5iV74brBLY2SdEI/nt4vnUoY1++r0P8QEAL5utR0fTFGeGijJMLHTmeNriroZQphGyVp46CbIuILMA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/yargs": {
|
||||||
|
"version": "13.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz",
|
||||||
|
"integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/yargs-parser": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/yargs-parser": {
|
||||||
|
"version": "20.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz",
|
||||||
|
"integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@zeit/ncc": {
|
||||||
|
"version": "0.20.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.20.5.tgz",
|
||||||
|
"integrity": "sha512-XU6uzwvv95DqxciQx+aOLhbyBx/13ky+RK1y88Age9Du3BlA4mMPCy13BGjayOrrumOzlq1XV3SD/BWiZENXlw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"ansi-regex": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "3.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||||
|
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"argparse": {
|
||||||
|
"version": "1.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||||
|
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"sprintf-js": "~1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"asynckit": {
|
||||||
|
"version": "0.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||||
|
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"balanced-match": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||||
|
},
|
||||||
|
"before-after-hook": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-jH6rKQIfroBbhEXVmI7XmXe3ix5S/PgJqpzdDPnR8JGLHWNYLsYZ6tK5iWOF/Ra3oqEX0NobXGlzbiylIzVphQ=="
|
||||||
|
},
|
||||||
|
"brace-expansion": {
|
||||||
|
"version": "1.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
|
"requires": {
|
||||||
|
"balanced-match": "^1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"builtins": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og="
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "2.4.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||||
|
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^3.2.1",
|
||||||
|
"escape-string-regexp": "^1.0.5",
|
||||||
|
"supports-color": "^5.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "1.9.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||||
|
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-name": "1.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||||
|
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"combined-stream": {
|
||||||
|
"version": "1.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||||
|
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"delayed-stream": "~1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"comment-json": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/comment-json/-/comment-json-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-P7XwYkC3qjIK45EAa9c5Y3lR7SMXhJqwFdWg3niAIAcbk3zlpKDdajV8Hyz/Y3sGNn3l+YNMl8A2N/OubSArHg==",
|
||||||
|
"requires": {
|
||||||
|
"core-util-is": "^1.0.2",
|
||||||
|
"esprima": "^4.0.1",
|
||||||
|
"has-own-prop": "^2.0.0",
|
||||||
|
"repeat-string": "^1.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"concat-map": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||||
|
},
|
||||||
|
"core-util-is": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||||
|
},
|
||||||
|
"cross-spawn": {
|
||||||
|
"version": "6.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||||
|
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||||
|
"requires": {
|
||||||
|
"nice-try": "^1.0.4",
|
||||||
|
"path-key": "^2.0.1",
|
||||||
|
"semver": "^5.5.0",
|
||||||
|
"shebang-command": "^1.2.0",
|
||||||
|
"which": "^1.2.9"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delayed-stream": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"deprecation": {
|
||||||
|
"version": "2.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
||||||
|
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
|
||||||
|
},
|
||||||
|
"diff-sequences": {
|
||||||
|
"version": "24.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz",
|
||||||
|
"integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"end-of-stream": {
|
||||||
|
"version": "1.4.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
||||||
|
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
||||||
|
"requires": {
|
||||||
|
"once": "^1.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"escape-string-regexp": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||||
|
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"esprima": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||||
|
},
|
||||||
|
"evt": {
|
||||||
|
"version": "1.6.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/evt/-/evt-1.6.8.tgz",
|
||||||
|
"integrity": "sha512-QU0KfT16dG1z1VI7SzhDGZkCbc5LDnTBNGgKVjotmOrOr0M851hepIZx77YAlOwmwqdIx+uyOz24dxBLKy4bOw==",
|
||||||
|
"requires": {
|
||||||
|
"minimal-polyfills": "^1.0.8",
|
||||||
|
"run-exclusive": "^2.1.12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"execa": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
|
||||||
|
"requires": {
|
||||||
|
"cross-spawn": "^6.0.0",
|
||||||
|
"get-stream": "^4.0.0",
|
||||||
|
"is-stream": "^1.1.0",
|
||||||
|
"npm-run-path": "^2.0.0",
|
||||||
|
"p-finally": "^1.0.0",
|
||||||
|
"signal-exit": "^3.0.0",
|
||||||
|
"strip-eof": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"form-data": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"asynckit": "^0.4.0",
|
||||||
|
"combined-stream": "^1.0.8",
|
||||||
|
"mime-types": "^2.1.12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fs.realpath": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||||
|
},
|
||||||
|
"get-stream": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
|
||||||
|
"requires": {
|
||||||
|
"pump": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"glob": {
|
||||||
|
"version": "7.1.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
||||||
|
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
|
||||||
|
"requires": {
|
||||||
|
"fs.realpath": "^1.0.0",
|
||||||
|
"inflight": "^1.0.4",
|
||||||
|
"inherits": "2",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"path-is-absolute": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has-flag": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"has-own-prop": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-own-prop/-/has-own-prop-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ=="
|
||||||
|
},
|
||||||
|
"inflight": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||||
|
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||||
|
"requires": {
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"wrappy": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"inherits": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||||
|
},
|
||||||
|
"is-plain-object": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
|
||||||
|
},
|
||||||
|
"is-stream": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
|
||||||
|
},
|
||||||
|
"isexe": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
||||||
|
},
|
||||||
|
"jest-diff": {
|
||||||
|
"version": "24.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz",
|
||||||
|
"integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"chalk": "^2.0.1",
|
||||||
|
"diff-sequences": "^24.9.0",
|
||||||
|
"jest-get-type": "^24.9.0",
|
||||||
|
"pretty-format": "^24.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jest-get-type": {
|
||||||
|
"version": "24.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz",
|
||||||
|
"integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"js-yaml": {
|
||||||
|
"version": "3.14.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
|
||||||
|
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"argparse": "^1.0.7",
|
||||||
|
"esprima": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"macos-release": {
|
||||||
|
"version": "2.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.4.1.tgz",
|
||||||
|
"integrity": "sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg=="
|
||||||
|
},
|
||||||
|
"mime-db": {
|
||||||
|
"version": "1.46.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
|
||||||
|
"integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"mime-types": {
|
||||||
|
"version": "2.1.29",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz",
|
||||||
|
"integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"mime-db": "1.46.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimal-polyfills": {
|
||||||
|
"version": "1.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimal-polyfills/-/minimal-polyfills-1.0.8.tgz",
|
||||||
|
"integrity": "sha512-UMxkuvOc+d+ipPXCJnKb6dsBwkNccXPNHn77GAvUTVIpXklqWT2uu1flluct2jYVx6v0at2NbggnKar0V7WMng=="
|
||||||
|
},
|
||||||
|
"minimatch": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||||
|
"requires": {
|
||||||
|
"brace-expansion": "^1.1.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nice-try": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||||
|
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
||||||
|
},
|
||||||
|
"node-fetch": {
|
||||||
|
"version": "2.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||||
|
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
|
||||||
|
},
|
||||||
|
"npm-run-path": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||||
|
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
|
||||||
|
"requires": {
|
||||||
|
"path-key": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"once": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
|
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||||
|
"requires": {
|
||||||
|
"wrappy": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"os-name": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==",
|
||||||
|
"requires": {
|
||||||
|
"macos-release": "^2.2.0",
|
||||||
|
"windows-release": "^3.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"p-finally": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
|
||||||
|
},
|
||||||
|
"path-is-absolute": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||||
|
},
|
||||||
|
"path-key": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||||
|
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
|
||||||
|
},
|
||||||
|
"prettier": {
|
||||||
|
"version": "1.19.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
|
||||||
|
"integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"pretty-format": {
|
||||||
|
"version": "24.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz",
|
||||||
|
"integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@jest/types": "^24.9.0",
|
||||||
|
"ansi-regex": "^4.0.0",
|
||||||
|
"ansi-styles": "^3.2.0",
|
||||||
|
"react-is": "^16.8.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pump": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
||||||
|
"requires": {
|
||||||
|
"end-of-stream": "^1.1.0",
|
||||||
|
"once": "^1.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"react-is": {
|
||||||
|
"version": "16.13.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||||
|
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"repeat-string": {
|
||||||
|
"version": "1.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
|
||||||
|
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
|
||||||
|
},
|
||||||
|
"run-exclusive": {
|
||||||
|
"version": "2.2.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/run-exclusive/-/run-exclusive-2.2.14.tgz",
|
||||||
|
"integrity": "sha512-NHaQfB3zPJFx7p4M06AcmoK8xz/h8YDMCdy3jxfyoC9VqIbl1U+DiVjUuAYZBRMwvj5qkQnOUGfsmyUC4k46dg==",
|
||||||
|
"requires": {
|
||||||
|
"minimal-polyfills": "^2.1.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"minimal-polyfills": {
|
||||||
|
"version": "2.1.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimal-polyfills/-/minimal-polyfills-2.1.6.tgz",
|
||||||
|
"integrity": "sha512-vqoxj7eMzsqX0M6/dkgoNFPw6Mztgn5qjSl0bWGboQeU7Y4UPLeyoqQw6JI+0qmBcJYdkr3nK7dqY8u/fgRp5g=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripting-tools": {
|
||||||
|
"version": "0.19.13",
|
||||||
|
"resolved": "https://registry.npmjs.org/scripting-tools/-/scripting-tools-0.19.13.tgz",
|
||||||
|
"integrity": "sha512-d09H8vzSVa8p4XUTJqHZDbjKDyl5TG3SyPfNPUUkfyOwjwykStmfK8AXyWq7VRWjcgzTpkTiJ9uMk1NytMQY7w=="
|
||||||
|
},
|
||||||
|
"semver": {
|
||||||
|
"version": "5.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||||
|
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
||||||
|
},
|
||||||
|
"shebang-command": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||||
|
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
|
||||||
|
"requires": {
|
||||||
|
"shebang-regex": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"shebang-regex": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
|
||||||
|
},
|
||||||
|
"signal-exit": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
|
||||||
|
},
|
||||||
|
"sprintf-js": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"strip-eof": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tsafe": {
|
||||||
|
"version": "0.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tsafe/-/tsafe-0.8.1.tgz",
|
||||||
|
"integrity": "sha512-EfPjxQHzndQAV/uh0SMGP26Wg3dCuaw8dRv2VPEuGHen5qzg2oqsMvZw2wkQFkiMisZq2fm95m5lheimW2Fpvg=="
|
||||||
|
},
|
||||||
|
"typescript": {
|
||||||
|
"version": "3.9.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz",
|
||||||
|
"integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"universal-user-agent": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q==",
|
||||||
|
"requires": {
|
||||||
|
"os-name": "^3.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"url-join": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA=="
|
||||||
|
},
|
||||||
|
"validate-npm-package-name": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=",
|
||||||
|
"requires": {
|
||||||
|
"builtins": "^1.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"which": {
|
||||||
|
"version": "1.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||||
|
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
||||||
|
"requires": {
|
||||||
|
"isexe": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"windows-release": {
|
||||||
|
"version": "3.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.3.tgz",
|
||||||
|
"integrity": "sha512-OSOGH1QYiW5yVor9TtmXKQvt2vjQqbYS+DqmsZw+r7xDwLXEeT3JGW0ZppFmHx4diyXmxt238KFR3N9jzevBRg==",
|
||||||
|
"requires": {
|
||||||
|
"execa": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wrappy": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
90
package.json
Executable file → Normal file
90
package.json
Executable file → Normal file
|
|
@ -1,66 +1,42 @@
|
||||||
{
|
{
|
||||||
"name": "#{REPO_NAME}#",
|
"name": "github_actions_toolkit",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "#{DESC}#",
|
"private": true,
|
||||||
|
"description": "A collection of github actions",
|
||||||
|
"main": "lib/main.js",
|
||||||
|
"scripts": {
|
||||||
|
"generate-action-yml": "node lib/bin/generateActionYml.js",
|
||||||
|
"pack": "ncc build",
|
||||||
|
"build": "tsc && npm run generate-action-yml && npm run pack",
|
||||||
|
"clean": "rm -rf dist lib node_modules package-lock.json"
|
||||||
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#.git"
|
"url": "git+https://github.com/garronej/github-actions-toolkit.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"author": "u/garronej",
|
||||||
"build": "tsc",
|
|
||||||
"test": "vitest",
|
|
||||||
"lint:check": "eslint . --ext .ts,.tsx",
|
|
||||||
"lint": "npm run lint:check -- --fix",
|
|
||||||
"_format": "prettier '**/*.{ts,tsx,json,md}'",
|
|
||||||
"format": "npm run _format -- --write",
|
|
||||||
"format:check": "npm run _format -- --list-different",
|
|
||||||
"link-in-app": "tsx scripts/link-in-app.ts"
|
|
||||||
},
|
|
||||||
"main": "dist/index.js",
|
|
||||||
"types": "dist/index.d.ts",
|
|
||||||
"exports": {
|
|
||||||
".": "./dist/index.js",
|
|
||||||
"./*": "./dist/*.js",
|
|
||||||
"./tools": "./dist/tools/index.js"
|
|
||||||
},
|
|
||||||
"lint-staged": {
|
|
||||||
"*.{ts,tsx}": [
|
|
||||||
"eslint --fix"
|
|
||||||
],
|
|
||||||
"*.{ts,tsx,json,md}": [
|
|
||||||
"prettier --write"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"husky": {
|
|
||||||
"hooks": {
|
|
||||||
"pre-commit": "lint-staged -v"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"author": "u/#{USER_OR_ORG}#",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"dependencies": {
|
||||||
"src/",
|
"@actions/core": "^1.2.0",
|
||||||
"dist/",
|
"@octokit/rest": "^17.6.0",
|
||||||
"!dist/tsconfig.tsbuildinfo"
|
"comment-json": "^3.0.2",
|
||||||
],
|
"evt": "1.6.8",
|
||||||
"keywords": [],
|
"glob": "^7.1.6",
|
||||||
"homepage": "https://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#",
|
"node-fetch": "^2.6.1",
|
||||||
"devDependencies": {
|
"scripting-tools": "^0.19.12",
|
||||||
"@types/node": "^20.2.1",
|
"tsafe": "^0.8.1",
|
||||||
"typescript": "^5.4.5",
|
"url-join": "^4.0.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.6",
|
"validate-npm-package-name": "^3.0.0"
|
||||||
"@typescript-eslint/parser": "^5.59.6",
|
|
||||||
"eslint": "^8.41.0",
|
|
||||||
"eslint-config-prettier": "^8.8.0",
|
|
||||||
"husky": "^4.3.8",
|
|
||||||
"lint-staged": "^11.1.1",
|
|
||||||
"prettier": "^3.3.2",
|
|
||||||
"vitest": "^1.6.0",
|
|
||||||
"tsx": "^4.15.5",
|
|
||||||
"react": "^18.3.1",
|
|
||||||
"@types/react": "^18.3.3"
|
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"devDependencies": {
|
||||||
"access": "public"
|
"@types/glob": "^7.1.1",
|
||||||
|
"@types/jest": "^24.0.23",
|
||||||
|
"@types/node": "^12.7.12",
|
||||||
|
"@types/node-fetch": "^2.5.7",
|
||||||
|
"@types/validate-npm-package-name": "^3.0.0",
|
||||||
|
"@zeit/ncc": "^0.20.5",
|
||||||
|
"js-yaml": "^3.13.1",
|
||||||
|
"prettier": "^1.19.1",
|
||||||
|
"typescript": "^3.6.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
317
res/closed_pr.json
Normal file
317
res/closed_pr.json
Normal file
|
|
@ -0,0 +1,317 @@
|
||||||
|
{
|
||||||
|
"url": "https://api.github.com/repos/denoland/deno_website2/pulls/393",
|
||||||
|
"id": 416660425,
|
||||||
|
"node_id": "MDExOlB1bGxSZXF1ZXN0NDE2NjYwNDI1",
|
||||||
|
"html_url": "https://github.com/denoland/deno_website2/pull/393",
|
||||||
|
"diff_url": "https://github.com/denoland/deno_website2/pull/393.diff",
|
||||||
|
"patch_url": "https://github.com/denoland/deno_website2/pull/393.patch",
|
||||||
|
"issue_url": "https://api.github.com/repos/denoland/deno_website2/issues/393",
|
||||||
|
"number": 393,
|
||||||
|
"state": "closed",
|
||||||
|
"locked": false,
|
||||||
|
"title": "fix cf worker deploy",
|
||||||
|
"user": {
|
||||||
|
"login": "ry",
|
||||||
|
"id": 80,
|
||||||
|
"node_id": "MDQ6VXNlcjgw",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/80?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/ry",
|
||||||
|
"html_url": "https://github.com/ry",
|
||||||
|
"followers_url": "https://api.github.com/users/ry/followers",
|
||||||
|
"following_url": "https://api.github.com/users/ry/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/ry/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/ry/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/ry/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/ry/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/ry/repos",
|
||||||
|
"events_url": "https://api.github.com/users/ry/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/ry/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"body": "",
|
||||||
|
"created_at": "2020-05-12T11:22:08Z",
|
||||||
|
"updated_at": "2020-05-12T11:25:32Z",
|
||||||
|
"closed_at": "2020-05-12T11:25:28Z",
|
||||||
|
"merged_at": "2020-05-12T11:25:28Z",
|
||||||
|
"merge_commit_sha": "111d5300a10fb43e33be0ab9afa9e7762b32c268",
|
||||||
|
"assignee": null,
|
||||||
|
"assignees": [],
|
||||||
|
"requested_reviewers": [],
|
||||||
|
"requested_teams": [],
|
||||||
|
"labels": [],
|
||||||
|
"milestone": null,
|
||||||
|
"draft": false,
|
||||||
|
"commits_url": "https://api.github.com/repos/denoland/deno_website2/pulls/393/commits",
|
||||||
|
"review_comments_url": "https://api.github.com/repos/denoland/deno_website2/pulls/393/comments",
|
||||||
|
"review_comment_url": "https://api.github.com/repos/denoland/deno_website2/pulls/comments{/number}",
|
||||||
|
"comments_url": "https://api.github.com/repos/denoland/deno_website2/issues/393/comments",
|
||||||
|
"statuses_url": "https://api.github.com/repos/denoland/deno_website2/statuses/70de9ffc401467de5014f11b9d6c45817f98a7e5",
|
||||||
|
"head": {
|
||||||
|
"label": "ry:fix_worker",
|
||||||
|
"ref": "fix_worker",
|
||||||
|
"sha": "70de9ffc401467de5014f11b9d6c45817f98a7e5",
|
||||||
|
"user": {
|
||||||
|
"login": "ry",
|
||||||
|
"id": 80,
|
||||||
|
"node_id": "MDQ6VXNlcjgw",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/80?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/ry",
|
||||||
|
"html_url": "https://github.com/ry",
|
||||||
|
"followers_url": "https://api.github.com/users/ry/followers",
|
||||||
|
"following_url": "https://api.github.com/users/ry/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/ry/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/ry/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/ry/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/ry/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/ry/repos",
|
||||||
|
"events_url": "https://api.github.com/users/ry/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/ry/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"id": 217404450,
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkyMTc0MDQ0NTA=",
|
||||||
|
"name": "deno_website2",
|
||||||
|
"full_name": "ry/deno_website2",
|
||||||
|
"private": false,
|
||||||
|
"owner": {
|
||||||
|
"login": "ry",
|
||||||
|
"id": 80,
|
||||||
|
"node_id": "MDQ6VXNlcjgw",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/80?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/ry",
|
||||||
|
"html_url": "https://github.com/ry",
|
||||||
|
"followers_url": "https://api.github.com/users/ry/followers",
|
||||||
|
"following_url": "https://api.github.com/users/ry/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/ry/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/ry/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/ry/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/ry/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/ry/repos",
|
||||||
|
"events_url": "https://api.github.com/users/ry/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/ry/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"html_url": "https://github.com/ry/deno_website2",
|
||||||
|
"description": "prototype of new deno.land website ",
|
||||||
|
"fork": true,
|
||||||
|
"url": "https://api.github.com/repos/ry/deno_website2",
|
||||||
|
"forks_url": "https://api.github.com/repos/ry/deno_website2/forks",
|
||||||
|
"keys_url": "https://api.github.com/repos/ry/deno_website2/keys{/key_id}",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/ry/deno_website2/collaborators{/collaborator}",
|
||||||
|
"teams_url": "https://api.github.com/repos/ry/deno_website2/teams",
|
||||||
|
"hooks_url": "https://api.github.com/repos/ry/deno_website2/hooks",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/ry/deno_website2/issues/events{/number}",
|
||||||
|
"events_url": "https://api.github.com/repos/ry/deno_website2/events",
|
||||||
|
"assignees_url": "https://api.github.com/repos/ry/deno_website2/assignees{/user}",
|
||||||
|
"branches_url": "https://api.github.com/repos/ry/deno_website2/branches{/branch}",
|
||||||
|
"tags_url": "https://api.github.com/repos/ry/deno_website2/tags",
|
||||||
|
"blobs_url": "https://api.github.com/repos/ry/deno_website2/git/blobs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/ry/deno_website2/git/tags{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/ry/deno_website2/git/refs{/sha}",
|
||||||
|
"trees_url": "https://api.github.com/repos/ry/deno_website2/git/trees{/sha}",
|
||||||
|
"statuses_url": "https://api.github.com/repos/ry/deno_website2/statuses/{sha}",
|
||||||
|
"languages_url": "https://api.github.com/repos/ry/deno_website2/languages",
|
||||||
|
"stargazers_url": "https://api.github.com/repos/ry/deno_website2/stargazers",
|
||||||
|
"contributors_url": "https://api.github.com/repos/ry/deno_website2/contributors",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/ry/deno_website2/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/ry/deno_website2/subscription",
|
||||||
|
"commits_url": "https://api.github.com/repos/ry/deno_website2/commits{/sha}",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/ry/deno_website2/git/commits{/sha}",
|
||||||
|
"comments_url": "https://api.github.com/repos/ry/deno_website2/comments{/number}",
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/ry/deno_website2/issues/comments{/number}",
|
||||||
|
"contents_url": "https://api.github.com/repos/ry/deno_website2/contents/{+path}",
|
||||||
|
"compare_url": "https://api.github.com/repos/ry/deno_website2/compare/{base}...{head}",
|
||||||
|
"merges_url": "https://api.github.com/repos/ry/deno_website2/merges",
|
||||||
|
"archive_url": "https://api.github.com/repos/ry/deno_website2/{archive_format}{/ref}",
|
||||||
|
"downloads_url": "https://api.github.com/repos/ry/deno_website2/downloads",
|
||||||
|
"issues_url": "https://api.github.com/repos/ry/deno_website2/issues{/number}",
|
||||||
|
"pulls_url": "https://api.github.com/repos/ry/deno_website2/pulls{/number}",
|
||||||
|
"milestones_url": "https://api.github.com/repos/ry/deno_website2/milestones{/number}",
|
||||||
|
"notifications_url": "https://api.github.com/repos/ry/deno_website2/notifications{?since,all,participating}",
|
||||||
|
"labels_url": "https://api.github.com/repos/ry/deno_website2/labels{/name}",
|
||||||
|
"releases_url": "https://api.github.com/repos/ry/deno_website2/releases{/id}",
|
||||||
|
"deployments_url": "https://api.github.com/repos/ry/deno_website2/deployments",
|
||||||
|
"created_at": "2019-10-24T22:14:58Z",
|
||||||
|
"updated_at": "2020-05-12T16:20:05Z",
|
||||||
|
"pushed_at": "2020-05-12T11:25:32Z",
|
||||||
|
"git_url": "git://github.com/ry/deno_website2.git",
|
||||||
|
"ssh_url": "git@github.com:ry/deno_website2.git",
|
||||||
|
"clone_url": "https://github.com/ry/deno_website2.git",
|
||||||
|
"svn_url": "https://github.com/ry/deno_website2",
|
||||||
|
"homepage": "https://denoland.netlify.com",
|
||||||
|
"size": 1381,
|
||||||
|
"stargazers_count": 5,
|
||||||
|
"watchers_count": 5,
|
||||||
|
"language": null,
|
||||||
|
"has_issues": false,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"forks_count": 0,
|
||||||
|
"mirror_url": null,
|
||||||
|
"archived": false,
|
||||||
|
"disabled": false,
|
||||||
|
"open_issues_count": 0,
|
||||||
|
"license": null,
|
||||||
|
"forks": 0,
|
||||||
|
"open_issues": 0,
|
||||||
|
"watchers": 5,
|
||||||
|
"default_branch": "master"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"label": "denoland:master",
|
||||||
|
"ref": "master",
|
||||||
|
"sha": "6147b893faf9ee61c28c5f6854d82098a749c8ee",
|
||||||
|
"user": {
|
||||||
|
"login": "denoland",
|
||||||
|
"id": 42048915,
|
||||||
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjQyMDQ4OTE1",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/42048915?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/denoland",
|
||||||
|
"html_url": "https://github.com/denoland",
|
||||||
|
"followers_url": "https://api.github.com/users/denoland/followers",
|
||||||
|
"following_url": "https://api.github.com/users/denoland/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/denoland/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/denoland/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/denoland/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/denoland/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/denoland/repos",
|
||||||
|
"events_url": "https://api.github.com/users/denoland/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/denoland/received_events",
|
||||||
|
"type": "Organization",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"id": 216156518,
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkyMTYxNTY1MTg=",
|
||||||
|
"name": "deno_website2",
|
||||||
|
"full_name": "denoland/deno_website2",
|
||||||
|
"private": false,
|
||||||
|
"owner": {
|
||||||
|
"login": "denoland",
|
||||||
|
"id": 42048915,
|
||||||
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjQyMDQ4OTE1",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/42048915?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/denoland",
|
||||||
|
"html_url": "https://github.com/denoland",
|
||||||
|
"followers_url": "https://api.github.com/users/denoland/followers",
|
||||||
|
"following_url": "https://api.github.com/users/denoland/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/denoland/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/denoland/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/denoland/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/denoland/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/denoland/repos",
|
||||||
|
"events_url": "https://api.github.com/users/denoland/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/denoland/received_events",
|
||||||
|
"type": "Organization",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"html_url": "https://github.com/denoland/deno_website2",
|
||||||
|
"description": "deno.land website ",
|
||||||
|
"fork": false,
|
||||||
|
"url": "https://api.github.com/repos/denoland/deno_website2",
|
||||||
|
"forks_url": "https://api.github.com/repos/denoland/deno_website2/forks",
|
||||||
|
"keys_url": "https://api.github.com/repos/denoland/deno_website2/keys{/key_id}",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/denoland/deno_website2/collaborators{/collaborator}",
|
||||||
|
"teams_url": "https://api.github.com/repos/denoland/deno_website2/teams",
|
||||||
|
"hooks_url": "https://api.github.com/repos/denoland/deno_website2/hooks",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/denoland/deno_website2/issues/events{/number}",
|
||||||
|
"events_url": "https://api.github.com/repos/denoland/deno_website2/events",
|
||||||
|
"assignees_url": "https://api.github.com/repos/denoland/deno_website2/assignees{/user}",
|
||||||
|
"branches_url": "https://api.github.com/repos/denoland/deno_website2/branches{/branch}",
|
||||||
|
"tags_url": "https://api.github.com/repos/denoland/deno_website2/tags",
|
||||||
|
"blobs_url": "https://api.github.com/repos/denoland/deno_website2/git/blobs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/denoland/deno_website2/git/tags{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/denoland/deno_website2/git/refs{/sha}",
|
||||||
|
"trees_url": "https://api.github.com/repos/denoland/deno_website2/git/trees{/sha}",
|
||||||
|
"statuses_url": "https://api.github.com/repos/denoland/deno_website2/statuses/{sha}",
|
||||||
|
"languages_url": "https://api.github.com/repos/denoland/deno_website2/languages",
|
||||||
|
"stargazers_url": "https://api.github.com/repos/denoland/deno_website2/stargazers",
|
||||||
|
"contributors_url": "https://api.github.com/repos/denoland/deno_website2/contributors",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/denoland/deno_website2/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/denoland/deno_website2/subscription",
|
||||||
|
"commits_url": "https://api.github.com/repos/denoland/deno_website2/commits{/sha}",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/denoland/deno_website2/git/commits{/sha}",
|
||||||
|
"comments_url": "https://api.github.com/repos/denoland/deno_website2/comments{/number}",
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/denoland/deno_website2/issues/comments{/number}",
|
||||||
|
"contents_url": "https://api.github.com/repos/denoland/deno_website2/contents/{+path}",
|
||||||
|
"compare_url": "https://api.github.com/repos/denoland/deno_website2/compare/{base}...{head}",
|
||||||
|
"merges_url": "https://api.github.com/repos/denoland/deno_website2/merges",
|
||||||
|
"archive_url": "https://api.github.com/repos/denoland/deno_website2/{archive_format}{/ref}",
|
||||||
|
"downloads_url": "https://api.github.com/repos/denoland/deno_website2/downloads",
|
||||||
|
"issues_url": "https://api.github.com/repos/denoland/deno_website2/issues{/number}",
|
||||||
|
"pulls_url": "https://api.github.com/repos/denoland/deno_website2/pulls{/number}",
|
||||||
|
"milestones_url": "https://api.github.com/repos/denoland/deno_website2/milestones{/number}",
|
||||||
|
"notifications_url": "https://api.github.com/repos/denoland/deno_website2/notifications{?since,all,participating}",
|
||||||
|
"labels_url": "https://api.github.com/repos/denoland/deno_website2/labels{/name}",
|
||||||
|
"releases_url": "https://api.github.com/repos/denoland/deno_website2/releases{/id}",
|
||||||
|
"deployments_url": "https://api.github.com/repos/denoland/deno_website2/deployments",
|
||||||
|
"created_at": "2019-10-19T05:53:43Z",
|
||||||
|
"updated_at": "2020-05-12T22:28:15Z",
|
||||||
|
"pushed_at": "2020-05-12T22:35:23Z",
|
||||||
|
"git_url": "git://github.com/denoland/deno_website2.git",
|
||||||
|
"ssh_url": "git@github.com:denoland/deno_website2.git",
|
||||||
|
"clone_url": "https://github.com/denoland/deno_website2.git",
|
||||||
|
"svn_url": "https://github.com/denoland/deno_website2",
|
||||||
|
"homepage": "https://deno.land/",
|
||||||
|
"size": 1517,
|
||||||
|
"stargazers_count": 187,
|
||||||
|
"watchers_count": 187,
|
||||||
|
"language": "TypeScript",
|
||||||
|
"has_issues": true,
|
||||||
|
"has_projects": false,
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_wiki": false,
|
||||||
|
"has_pages": false,
|
||||||
|
"forks_count": 131,
|
||||||
|
"mirror_url": null,
|
||||||
|
"archived": false,
|
||||||
|
"disabled": false,
|
||||||
|
"open_issues_count": 33,
|
||||||
|
"license": null,
|
||||||
|
"forks": 131,
|
||||||
|
"open_issues": 33,
|
||||||
|
"watchers": 187,
|
||||||
|
"default_branch": "master"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"_links": {
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/393"
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"href": "https://github.com/denoland/deno_website2/pull/393"
|
||||||
|
},
|
||||||
|
"issue": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/issues/393"
|
||||||
|
},
|
||||||
|
"comments": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/issues/393/comments"
|
||||||
|
},
|
||||||
|
"review_comments": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/393/comments"
|
||||||
|
},
|
||||||
|
"review_comment": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/comments{/number}"
|
||||||
|
},
|
||||||
|
"commits": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/393/commits"
|
||||||
|
},
|
||||||
|
"statuses": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/statuses/70de9ffc401467de5014f11b9d6c45817f98a7e5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"author_association": "CONTRIBUTOR"
|
||||||
|
}
|
||||||
|
|
||||||
114
res/commit.json
Normal file
114
res/commit.json
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
{
|
||||||
|
"status": 200,
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/commits?per_page=1&sha=master",
|
||||||
|
"headers": {
|
||||||
|
"access-control-allow-origin": "*",
|
||||||
|
"access-control-expose-headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset",
|
||||||
|
"cache-control": "private, max-age=60, s-maxage=60",
|
||||||
|
"connection": "close",
|
||||||
|
"content-encoding": "gzip",
|
||||||
|
"content-security-policy": "default-src 'none'",
|
||||||
|
"content-type": "application/json; charset=utf-8",
|
||||||
|
"date": "Thu, 30 Apr 2020 14:36:23 GMT",
|
||||||
|
"etag": "W/\"1b6b2c80a330e5d466b85298480afbf0\"",
|
||||||
|
"last-modified": "Thu, 30 Apr 2020 10:00:41 GMT",
|
||||||
|
"link": "<https://api.github.com/repositories/258429883/commits?per_page=1&sha=master&page=2>; rel=\"next\", <https://api.github.com/repositories/258429883/commits?per_page=1&sha=master&page=44>; rel=\"last\"",
|
||||||
|
"referrer-policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
|
||||||
|
"server": "GitHub.com",
|
||||||
|
"status": "200 OK",
|
||||||
|
"strict-transport-security": "max-age=31536000; includeSubdomains; preload",
|
||||||
|
"transfer-encoding": "chunked",
|
||||||
|
"vary": "Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With",
|
||||||
|
"x-accepted-oauth-scopes": "",
|
||||||
|
"x-content-type-options": "nosniff",
|
||||||
|
"x-frame-options": "deny",
|
||||||
|
"x-github-media-type": "github.v3; format=json",
|
||||||
|
"x-github-request-id": "C905:52E0:621381:7626A6:5EAAE267",
|
||||||
|
"x-oauth-scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages",
|
||||||
|
"x-ratelimit-limit": "5000",
|
||||||
|
"x-ratelimit-remaining": "4984",
|
||||||
|
"x-ratelimit-reset": "1588260675",
|
||||||
|
"x-xss-protection": "1; mode=block"
|
||||||
|
},
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"sha": "166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"node_id": "MDY6Q29tbWl0MjU4NDI5ODgzOjE2NmI0ODA2NTIwZWE2ZTUyYTFiODZjOWU2OThiMWJhM2UwODJhMjk=",
|
||||||
|
"commit": {
|
||||||
|
"author": {
|
||||||
|
"name": "Garrone Joseph",
|
||||||
|
"email": "joseph@semasim.com",
|
||||||
|
"date": "2020-04-30T10:00:41Z"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"name": "GitHub",
|
||||||
|
"email": "noreply@github.com",
|
||||||
|
"date": "2020-04-30T10:00:41Z"
|
||||||
|
},
|
||||||
|
"message": "deuxième commit sur master after branch related",
|
||||||
|
"tree": {
|
||||||
|
"sha": "8adc7382661b7a37233304b05b103d2e78b60194",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/git/trees/8adc7382661b7a37233304b05b103d2e78b60194"
|
||||||
|
},
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/git/commits/166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"comment_count": 0,
|
||||||
|
"verification": {
|
||||||
|
"verified": true,
|
||||||
|
"reason": "valid",
|
||||||
|
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJeqqHJCRBK7hj4Ov3rIwAAdHIIAKob66RvqPKgRq2nY8ALUYEh\nJDdkV8+pMcXJ/zCWNvO0VDdMyk74JUUO1m5h0VgJiW1x1qKRgT/PfjYJrKkREexK\nu4sM2BVhkln/R12BDxeZhV7RX5F+CMIIEZHPZ/YYjeQjm/XbHYhnGssUkn8xzMY1\noaUQvt7f3+SbufHiBeXCX9y4+tQ8F6/wd6mMPSChs01ZbNiJ1qf52btvl682gi5V\nulNTeWM7XKeIjk/KKItYH/TiURS6bND0FZrooeEcpzSnuTidfBsWnQnmgDXW6tDC\ndWjFWLIhQ/EbT8bzpWboQh44WdbyuYl0ah9O996EMy/o4XPvZzk6RaYs+Wowdjc=\n=Oh/F\n-----END PGP SIGNATURE-----\n",
|
||||||
|
"payload": "tree 8adc7382661b7a37233304b05b103d2e78b60194\nparent 400346201ebb6e124b1598a898aac67b7d993837\nauthor Garrone Joseph <joseph@semasim.com> 1588240841 +0200\ncommitter GitHub <noreply@github.com> 1588240841 +0200\n\ndeuxième commit sur master after branch related"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/commits/166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo/commit/166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"comments_url": "https://api.github.com/repos/garronej/test-repo/commits/166b4806520ea6e52a1b86c9e698b1ba3e082a29/comments",
|
||||||
|
"author": {
|
||||||
|
"login": "garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/garronej",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"login": "web-flow",
|
||||||
|
"id": 19864447,
|
||||||
|
"node_id": "MDQ6VXNlcjE5ODY0NDQ3",
|
||||||
|
"avatar_url": "https://avatars3.githubusercontent.com/u/19864447?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/web-flow",
|
||||||
|
"html_url": "https://github.com/web-flow",
|
||||||
|
"followers_url": "https://api.github.com/users/web-flow/followers",
|
||||||
|
"following_url": "https://api.github.com/users/web-flow/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/web-flow/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/web-flow/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/web-flow/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/web-flow/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/web-flow/repos",
|
||||||
|
"events_url": "https://api.github.com/users/web-flow/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/web-flow/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"parents": [
|
||||||
|
{
|
||||||
|
"sha": "400346201ebb6e124b1598a898aac67b7d993837",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/commits/400346201ebb6e124b1598a898aac67b7d993837",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo/commit/400346201ebb6e124b1598a898aac67b7d993837"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
272
res/commits.json
Normal file
272
res/commits.json
Normal file
|
|
@ -0,0 +1,272 @@
|
||||||
|
{
|
||||||
|
"status": 200,
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/commits?per_page=3&sha=master",
|
||||||
|
"headers": {
|
||||||
|
"access-control-allow-origin": "*",
|
||||||
|
"access-control-expose-headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset",
|
||||||
|
"cache-control": "private, max-age=60, s-maxage=60",
|
||||||
|
"connection": "close",
|
||||||
|
"content-encoding": "gzip",
|
||||||
|
"content-security-policy": "default-src 'none'",
|
||||||
|
"content-type": "application/json; charset=utf-8",
|
||||||
|
"date": "Thu, 30 Apr 2020 15:16:28 GMT",
|
||||||
|
"etag": "W/\"41be386c101f0d960ea4e915f075cc88\"",
|
||||||
|
"last-modified": "Thu, 30 Apr 2020 10:00:41 GMT",
|
||||||
|
"link": "<https://api.github.com/repositories/258429883/commits?per_page=3&sha=master&page=2>; rel=\"next\", <https://api.github.com/repositories/258429883/commits?per_page=3&sha=master&page=15>; rel=\"last\"",
|
||||||
|
"referrer-policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
|
||||||
|
"server": "GitHub.com",
|
||||||
|
"status": "200 OK",
|
||||||
|
"strict-transport-security": "max-age=31536000; includeSubdomains; preload",
|
||||||
|
"transfer-encoding": "chunked",
|
||||||
|
"vary": "Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With",
|
||||||
|
"x-accepted-oauth-scopes": "",
|
||||||
|
"x-content-type-options": "nosniff",
|
||||||
|
"x-frame-options": "deny",
|
||||||
|
"x-github-media-type": "github.v3; format=json",
|
||||||
|
"x-github-request-id": "C9E8:27E36:727543:89BEDE:5EAAEBCC",
|
||||||
|
"x-oauth-scopes": "admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, read:packages, repo, user, workflow, write:discussion, write:packages",
|
||||||
|
"x-ratelimit-limit": "5000",
|
||||||
|
"x-ratelimit-remaining": "4983",
|
||||||
|
"x-ratelimit-reset": "1588260675",
|
||||||
|
"x-xss-protection": "1; mode=block"
|
||||||
|
},
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"sha": "166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"node_id": "MDY6Q29tbWl0MjU4NDI5ODgzOjE2NmI0ODA2NTIwZWE2ZTUyYTFiODZjOWU2OThiMWJhM2UwODJhMjk=",
|
||||||
|
"commit": {
|
||||||
|
"author": {
|
||||||
|
"name": "Garrone Joseph",
|
||||||
|
"email": "joseph@semasim.com",
|
||||||
|
"date": "2020-04-30T10:00:41Z"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"name": "GitHub",
|
||||||
|
"email": "noreply@github.com",
|
||||||
|
"date": "2020-04-30T10:00:41Z"
|
||||||
|
},
|
||||||
|
"message": "deuxième commit sur master after branch related",
|
||||||
|
"tree": {
|
||||||
|
"sha": "8adc7382661b7a37233304b05b103d2e78b60194",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/git/trees/8adc7382661b7a37233304b05b103d2e78b60194"
|
||||||
|
},
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/git/commits/166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"comment_count": 0,
|
||||||
|
"verification": {
|
||||||
|
"verified": true,
|
||||||
|
"reason": "valid",
|
||||||
|
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJeqqHJCRBK7hj4Ov3rIwAAdHIIAKob66RvqPKgRq2nY8ALUYEh\nJDdkV8+pMcXJ/zCWNvO0VDdMyk74JUUO1m5h0VgJiW1x1qKRgT/PfjYJrKkREexK\nu4sM2BVhkln/R12BDxeZhV7RX5F+CMIIEZHPZ/YYjeQjm/XbHYhnGssUkn8xzMY1\noaUQvt7f3+SbufHiBeXCX9y4+tQ8F6/wd6mMPSChs01ZbNiJ1qf52btvl682gi5V\nulNTeWM7XKeIjk/KKItYH/TiURS6bND0FZrooeEcpzSnuTidfBsWnQnmgDXW6tDC\ndWjFWLIhQ/EbT8bzpWboQh44WdbyuYl0ah9O996EMy/o4XPvZzk6RaYs+Wowdjc=\n=Oh/F\n-----END PGP SIGNATURE-----\n",
|
||||||
|
"payload": "tree 8adc7382661b7a37233304b05b103d2e78b60194\nparent 400346201ebb6e124b1598a898aac67b7d993837\nauthor Garrone Joseph <joseph@semasim.com> 1588240841 +0200\ncommitter GitHub <noreply@github.com> 1588240841 +0200\n\ndeuxième commit sur master after branch related"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/commits/166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo/commit/166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"comments_url": "https://api.github.com/repos/garronej/test-repo/commits/166b4806520ea6e52a1b86c9e698b1ba3e082a29/comments",
|
||||||
|
"author": {
|
||||||
|
"login": "garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/garronej",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"login": "web-flow",
|
||||||
|
"id": 19864447,
|
||||||
|
"node_id": "MDQ6VXNlcjE5ODY0NDQ3",
|
||||||
|
"avatar_url": "https://avatars3.githubusercontent.com/u/19864447?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/web-flow",
|
||||||
|
"html_url": "https://github.com/web-flow",
|
||||||
|
"followers_url": "https://api.github.com/users/web-flow/followers",
|
||||||
|
"following_url": "https://api.github.com/users/web-flow/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/web-flow/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/web-flow/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/web-flow/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/web-flow/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/web-flow/repos",
|
||||||
|
"events_url": "https://api.github.com/users/web-flow/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/web-flow/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"parents": [
|
||||||
|
{
|
||||||
|
"sha": "400346201ebb6e124b1598a898aac67b7d993837",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/commits/400346201ebb6e124b1598a898aac67b7d993837",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo/commit/400346201ebb6e124b1598a898aac67b7d993837"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha": "400346201ebb6e124b1598a898aac67b7d993837",
|
||||||
|
"node_id": "MDY6Q29tbWl0MjU4NDI5ODgzOjQwMDM0NjIwMWViYjZlMTI0YjE1OThhODk4YWFjNjdiN2Q5OTM4Mzc=",
|
||||||
|
"commit": {
|
||||||
|
"author": {
|
||||||
|
"name": "Garrone Joseph",
|
||||||
|
"email": "joseph@semasim.com",
|
||||||
|
"date": "2020-04-30T10:00:07Z"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"name": "GitHub",
|
||||||
|
"email": "noreply@github.com",
|
||||||
|
"date": "2020-04-30T10:00:07Z"
|
||||||
|
},
|
||||||
|
"message": "premier commit sur master after branch created",
|
||||||
|
"tree": {
|
||||||
|
"sha": "89168b8f7b6703c58ca113d94b7767a5c7de6774",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/git/trees/89168b8f7b6703c58ca113d94b7767a5c7de6774"
|
||||||
|
},
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/git/commits/400346201ebb6e124b1598a898aac67b7d993837",
|
||||||
|
"comment_count": 0,
|
||||||
|
"verification": {
|
||||||
|
"verified": true,
|
||||||
|
"reason": "valid",
|
||||||
|
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJeqqGoCRBK7hj4Ov3rIwAAdHIIAHsfm2pXM13Ccp5qqaLslx3s\nB7vmWMpSZvkbHDrDAEO05j+XCM/lmmRBzfrn84LlpCGqCALj7KbjpYWg55P1OC4u\nxbvJV91e4/XM3GEX4+80XaOLi/6UR9yc8Tfa/t85HX1tZuxPW6ULS8pNcaXT4c0y\nRI+2C1bAhXOPrs2jdwdxBCLEhX7vpxUEptMBQ8y9rLpeLGgbB1oEHTusMu4wl1Gk\nSyyV35M1XrsMMg4nYEUuTv8RzOneiPiU80ZJC5+BBfF3aJsDpPKpR72+iUL83AGG\n4M78Lyls5oURHdy6DnYBDVUVcQvid2gYDd7/fc3lto4o5NGfW8vcF0ykMxXiiZY=\n=G/et\n-----END PGP SIGNATURE-----\n",
|
||||||
|
"payload": "tree 89168b8f7b6703c58ca113d94b7767a5c7de6774\nparent 2f7a55c9de78965b0918868deb35830ab0e68532\nauthor Garrone Joseph <joseph@semasim.com> 1588240807 +0200\ncommitter GitHub <noreply@github.com> 1588240807 +0200\n\npremier commit sur master after branch created"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/commits/400346201ebb6e124b1598a898aac67b7d993837",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo/commit/400346201ebb6e124b1598a898aac67b7d993837",
|
||||||
|
"comments_url": "https://api.github.com/repos/garronej/test-repo/commits/400346201ebb6e124b1598a898aac67b7d993837/comments",
|
||||||
|
"author": {
|
||||||
|
"login": "garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/garronej",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"login": "web-flow",
|
||||||
|
"id": 19864447,
|
||||||
|
"node_id": "MDQ6VXNlcjE5ODY0NDQ3",
|
||||||
|
"avatar_url": "https://avatars3.githubusercontent.com/u/19864447?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/web-flow",
|
||||||
|
"html_url": "https://github.com/web-flow",
|
||||||
|
"followers_url": "https://api.github.com/users/web-flow/followers",
|
||||||
|
"following_url": "https://api.github.com/users/web-flow/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/web-flow/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/web-flow/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/web-flow/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/web-flow/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/web-flow/repos",
|
||||||
|
"events_url": "https://api.github.com/users/web-flow/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/web-flow/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"parents": [
|
||||||
|
{
|
||||||
|
"sha": "2f7a55c9de78965b0918868deb35830ab0e68532",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/commits/2f7a55c9de78965b0918868deb35830ab0e68532",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo/commit/2f7a55c9de78965b0918868deb35830ab0e68532"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sha": "2f7a55c9de78965b0918868deb35830ab0e68532",
|
||||||
|
"node_id": "MDY6Q29tbWl0MjU4NDI5ODgzOjJmN2E1NWM5ZGU3ODk2NWIwOTE4ODY4ZGViMzU4MzBhYjBlNjg1MzI=",
|
||||||
|
"commit": {
|
||||||
|
"author": {
|
||||||
|
"name": "Garrone Joseph",
|
||||||
|
"email": "joseph@semasim.com",
|
||||||
|
"date": "2020-04-30T09:56:57Z"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"name": "GitHub",
|
||||||
|
"email": "noreply@github.com",
|
||||||
|
"date": "2020-04-30T09:56:57Z"
|
||||||
|
},
|
||||||
|
"message": "Update README.md",
|
||||||
|
"tree": {
|
||||||
|
"sha": "0cf13ef05cdf393b11b338f743ca38441b5c7d37",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/git/trees/0cf13ef05cdf393b11b338f743ca38441b5c7d37"
|
||||||
|
},
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/git/commits/2f7a55c9de78965b0918868deb35830ab0e68532",
|
||||||
|
"comment_count": 0,
|
||||||
|
"verification": {
|
||||||
|
"verified": true,
|
||||||
|
"reason": "valid",
|
||||||
|
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJeqqDpCRBK7hj4Ov3rIwAAdHIIAAFJdooGPFU9k1xypLb+DGs8\nsxIU0skR0ZoVVWvtDeWsSBbZXzGv4W5Fq65OmBJtpEuYhKe2PBd7+XWQ9vhocXZU\nLvUnAFNEupoTK7qpxHALC9aF7HhwoVA8ilSU/IaD9DUEh20Yy0HPV5rXPhie1Evp\n/+HG76ywzYSPl/V/uWwPNoQeN4bSjrE6HvWEH61Of8fKZ7NamrLYDr59Y65XalPy\nIPgJGdhvq/KOx9UaUqG8WfFaValFZN02Z2kJ1FgcZ7XLfjpsvzSxcC8m7rISb7JX\nqrZ2VweR2m7w6+YLD2cfAuEYYu5Nepec4MBQ0AxjO/CinMhz/joetRvxVJNzeho=\n=RMoe\n-----END PGP SIGNATURE-----\n",
|
||||||
|
"payload": "tree 0cf13ef05cdf393b11b338f743ca38441b5c7d37\nparent 0fa34b925c720d8909a8c368268245d10fea9be9\nauthor Garrone Joseph <joseph@semasim.com> 1588240617 +0200\ncommitter GitHub <noreply@github.com> 1588240617 +0200\n\nUpdate README.md"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/commits/2f7a55c9de78965b0918868deb35830ab0e68532",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo/commit/2f7a55c9de78965b0918868deb35830ab0e68532",
|
||||||
|
"comments_url": "https://api.github.com/repos/garronej/test-repo/commits/2f7a55c9de78965b0918868deb35830ab0e68532/comments",
|
||||||
|
"author": {
|
||||||
|
"login": "garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/garronej",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"login": "web-flow",
|
||||||
|
"id": 19864447,
|
||||||
|
"node_id": "MDQ6VXNlcjE5ODY0NDQ3",
|
||||||
|
"avatar_url": "https://avatars3.githubusercontent.com/u/19864447?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/web-flow",
|
||||||
|
"html_url": "https://github.com/web-flow",
|
||||||
|
"followers_url": "https://api.github.com/users/web-flow/followers",
|
||||||
|
"following_url": "https://api.github.com/users/web-flow/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/web-flow/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/web-flow/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/web-flow/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/web-flow/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/web-flow/repos",
|
||||||
|
"events_url": "https://api.github.com/users/web-flow/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/web-flow/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"parents": [
|
||||||
|
{
|
||||||
|
"sha": "0fa34b925c720d8909a8c368268245d10fea9be9",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/commits/0fa34b925c720d8909a8c368268245d10fea9be9",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo/commit/0fa34b925c720d8909a8c368268245d10fea9be9"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
188
res/github_context.json
Normal file
188
res/github_context.json
Normal file
|
|
@ -0,0 +1,188 @@
|
||||||
|
{
|
||||||
|
"token": "***",
|
||||||
|
"job": "build",
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"sha": "166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"repository": "garronej/test-repo",
|
||||||
|
"repository_owner": "garronej",
|
||||||
|
"repositoryUrl": "git://github.com/garronej/test-repo.git",
|
||||||
|
"run_id": "92024361",
|
||||||
|
"run_number": "41",
|
||||||
|
"actor": "garronej",
|
||||||
|
"workflow": "Initial setup",
|
||||||
|
"head_ref": "",
|
||||||
|
"base_ref": "",
|
||||||
|
"event_name": "push",
|
||||||
|
"event": {
|
||||||
|
"after": "166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"base_ref": null,
|
||||||
|
"before": "400346201ebb6e124b1598a898aac67b7d993837",
|
||||||
|
"commits": [
|
||||||
|
{
|
||||||
|
"author": {
|
||||||
|
"email": "joseph@semasim.com",
|
||||||
|
"name": "Garrone Joseph",
|
||||||
|
"username": "garronej"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"email": "noreply@github.com",
|
||||||
|
"name": "GitHub",
|
||||||
|
"username": "web-flow"
|
||||||
|
},
|
||||||
|
"distinct": true,
|
||||||
|
"id": "166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"message": "deuxième commit sur master after branch related",
|
||||||
|
"timestamp": "2020-04-30T12:00:41+02:00",
|
||||||
|
"tree_id": "8adc7382661b7a37233304b05b103d2e78b60194",
|
||||||
|
"url": "https://github.com/garronej/test-repo/commit/166b4806520ea6e52a1b86c9e698b1ba3e082a29"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"compare": "https://github.com/garronej/test-repo/compare/400346201ebb...166b4806520e",
|
||||||
|
"created": false,
|
||||||
|
"deleted": false,
|
||||||
|
"forced": false,
|
||||||
|
"head_commit": {
|
||||||
|
"author": {
|
||||||
|
"email": "joseph@semasim.com",
|
||||||
|
"name": "Garrone Joseph",
|
||||||
|
"username": "garronej"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"email": "noreply@github.com",
|
||||||
|
"name": "GitHub",
|
||||||
|
"username": "web-flow"
|
||||||
|
},
|
||||||
|
"distinct": true,
|
||||||
|
"id": "166b4806520ea6e52a1b86c9e698b1ba3e082a29",
|
||||||
|
"message": "deuxième commit sur master after branch related",
|
||||||
|
"timestamp": "2020-04-30T12:00:41+02:00",
|
||||||
|
"tree_id": "8adc7382661b7a37233304b05b103d2e78b60194",
|
||||||
|
"url": "https://github.com/garronej/test-repo/commit/166b4806520ea6e52a1b86c9e698b1ba3e082a29"
|
||||||
|
},
|
||||||
|
"pusher": {
|
||||||
|
"email": "joseph.garrone@ensimag.grenoble-inp.fr",
|
||||||
|
"name": "garronej"
|
||||||
|
},
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"repository": {
|
||||||
|
"archive_url": "https://api.github.com/repos/garronej/test-repo/{archive_format}{/ref}",
|
||||||
|
"archived": false,
|
||||||
|
"assignees_url": "https://api.github.com/repos/garronej/test-repo/assignees{/user}",
|
||||||
|
"blobs_url": "https://api.github.com/repos/garronej/test-repo/git/blobs{/sha}",
|
||||||
|
"branches_url": "https://api.github.com/repos/garronej/test-repo/branches{/branch}",
|
||||||
|
"clone_url": "https://github.com/garronej/test-repo.git",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/garronej/test-repo/collaborators{/collaborator}",
|
||||||
|
"comments_url": "https://api.github.com/repos/garronej/test-repo/comments{/number}",
|
||||||
|
"commits_url": "https://api.github.com/repos/garronej/test-repo/commits{/sha}",
|
||||||
|
"compare_url": "https://api.github.com/repos/garronej/test-repo/compare/{base}...{head}",
|
||||||
|
"contents_url": "https://api.github.com/repos/garronej/test-repo/contents/{+path}",
|
||||||
|
"contributors_url": "https://api.github.com/repos/garronej/test-repo/contributors",
|
||||||
|
"created_at": 1587710837,
|
||||||
|
"default_branch": "master",
|
||||||
|
"deployments_url": "https://api.github.com/repos/garronej/test-repo/deployments",
|
||||||
|
"description": "Alors ? ",
|
||||||
|
"disabled": false,
|
||||||
|
"downloads_url": "https://api.github.com/repos/garronej/test-repo/downloads",
|
||||||
|
"events_url": "https://api.github.com/repos/garronej/test-repo/events",
|
||||||
|
"fork": false,
|
||||||
|
"forks": 1,
|
||||||
|
"forks_count": 1,
|
||||||
|
"forks_url": "https://api.github.com/repos/garronej/test-repo/forks",
|
||||||
|
"full_name": "garronej/test-repo",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/garronej/test-repo/git/commits{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/garronej/test-repo/git/refs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/garronej/test-repo/git/tags{/sha}",
|
||||||
|
"git_url": "git://github.com/garronej/test-repo.git",
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_issues": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"homepage": "",
|
||||||
|
"hooks_url": "https://api.github.com/repos/garronej/test-repo/hooks",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo",
|
||||||
|
"id": 258429883,
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/garronej/test-repo/issues/comments{/number}",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/garronej/test-repo/issues/events{/number}",
|
||||||
|
"issues_url": "https://api.github.com/repos/garronej/test-repo/issues{/number}",
|
||||||
|
"keys_url": "https://api.github.com/repos/garronej/test-repo/keys{/key_id}",
|
||||||
|
"labels_url": "https://api.github.com/repos/garronej/test-repo/labels{/name}",
|
||||||
|
"language": null,
|
||||||
|
"languages_url": "https://api.github.com/repos/garronej/test-repo/languages",
|
||||||
|
"license": null,
|
||||||
|
"master_branch": "master",
|
||||||
|
"merges_url": "https://api.github.com/repos/garronej/test-repo/merges",
|
||||||
|
"milestones_url": "https://api.github.com/repos/garronej/test-repo/milestones{/number}",
|
||||||
|
"mirror_url": null,
|
||||||
|
"name": "test-repo",
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkyNTg0Mjk4ODM=",
|
||||||
|
"notifications_url": "https://api.github.com/repos/garronej/test-repo/notifications{?since,all,participating}",
|
||||||
|
"open_issues": 0,
|
||||||
|
"open_issues_count": 0,
|
||||||
|
"owner": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"email": "joseph.garrone@ensimag.grenoble-inp.fr",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"name": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
},
|
||||||
|
"private": false,
|
||||||
|
"pulls_url": "https://api.github.com/repos/garronej/test-repo/pulls{/number}",
|
||||||
|
"pushed_at": 1588240841,
|
||||||
|
"releases_url": "https://api.github.com/repos/garronej/test-repo/releases{/id}",
|
||||||
|
"size": 37,
|
||||||
|
"ssh_url": "git@github.com:garronej/test-repo.git",
|
||||||
|
"stargazers": 1,
|
||||||
|
"stargazers_count": 1,
|
||||||
|
"stargazers_url": "https://api.github.com/repos/garronej/test-repo/stargazers",
|
||||||
|
"statuses_url": "https://api.github.com/repos/garronej/test-repo/statuses/{sha}",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/garronej/test-repo/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/garronej/test-repo/subscription",
|
||||||
|
"svn_url": "https://github.com/garronej/test-repo",
|
||||||
|
"tags_url": "https://api.github.com/repos/garronej/test-repo/tags",
|
||||||
|
"teams_url": "https://api.github.com/repos/garronej/test-repo/teams",
|
||||||
|
"trees_url": "https://api.github.com/repos/garronej/test-repo/git/trees{/sha}",
|
||||||
|
"updated_at": "2020-04-30T10:00:11Z",
|
||||||
|
"url": "https://github.com/garronej/test-repo",
|
||||||
|
"watchers": 1,
|
||||||
|
"watchers_count": 1
|
||||||
|
},
|
||||||
|
"sender": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"workspace": "/home/runner/work/test-repo/test-repo",
|
||||||
|
"action": "run1"
|
||||||
|
}
|
||||||
225
res/merged.json
Normal file
225
res/merged.json
Normal file
|
|
@ -0,0 +1,225 @@
|
||||||
|
{
|
||||||
|
"token": "***",
|
||||||
|
"job": "test",
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"sha": "36deb3a7cc241cfba71daceaa6efa80cbdc5e93e",
|
||||||
|
"repository": "garronej/test-repo",
|
||||||
|
"repository_owner": "garronej",
|
||||||
|
"repositoryUrl": "git://github.com/garronej/test-repo.git",
|
||||||
|
"run_id": "91992361",
|
||||||
|
"run_number": "10",
|
||||||
|
"actor": "garronej",
|
||||||
|
"workflow": "the workflow name",
|
||||||
|
"head_ref": "",
|
||||||
|
"base_ref": "",
|
||||||
|
"event_name": "push",
|
||||||
|
"event": {
|
||||||
|
"after": "36deb3a7cc241cfba71daceaa6efa80cbdc5e93e",
|
||||||
|
"base_ref": null,
|
||||||
|
"before": "3cac089f0b03951b610a389564198f53fb485579",
|
||||||
|
"commits": [
|
||||||
|
{
|
||||||
|
"author": {
|
||||||
|
"email": "joseph@semasim.com",
|
||||||
|
"name": "Garrone Joseph",
|
||||||
|
"username": "garronej"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"email": "noreply@github.com",
|
||||||
|
"name": "GitHub",
|
||||||
|
"username": "web-flow"
|
||||||
|
},
|
||||||
|
"distinct": false,
|
||||||
|
"id": "dd23ceb8c0002b80ca146cc2993acfd1da3c147a",
|
||||||
|
"message": "commit for pull request 4",
|
||||||
|
"timestamp": "2020-04-30T11:00:25+02:00",
|
||||||
|
"tree_id": "983dfaf9f4306ed0ddcafdc19965573d9bfd84ce",
|
||||||
|
"url": "https://github.com/garronej/test-repo/commit/dd23ceb8c0002b80ca146cc2993acfd1da3c147a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": {
|
||||||
|
"email": "joseph@semasim.com",
|
||||||
|
"name": "Garrone Joseph",
|
||||||
|
"username": "garronej"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"email": "noreply@github.com",
|
||||||
|
"name": "GitHub",
|
||||||
|
"username": "web-flow"
|
||||||
|
},
|
||||||
|
"distinct": false,
|
||||||
|
"id": "e3788c6b40c0d017f2422f64193753d47d240471",
|
||||||
|
"message": "Merge branch 'master' into garronej-patch-4",
|
||||||
|
"timestamp": "2020-04-30T11:02:24+02:00",
|
||||||
|
"tree_id": "a8188bb8b0af6309ae6936a4a7e5d0ffe44c0b3c",
|
||||||
|
"url": "https://github.com/garronej/test-repo/commit/e3788c6b40c0d017f2422f64193753d47d240471"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"author": {
|
||||||
|
"email": "joseph@semasim.com",
|
||||||
|
"name": "Garrone Joseph",
|
||||||
|
"username": "garronej"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"email": "noreply@github.com",
|
||||||
|
"name": "GitHub",
|
||||||
|
"username": "web-flow"
|
||||||
|
},
|
||||||
|
"distinct": true,
|
||||||
|
"id": "36deb3a7cc241cfba71daceaa6efa80cbdc5e93e",
|
||||||
|
"message": "Merge pull request #3 from garronej/garronej-patch-4\n\ncommit for pull request 4",
|
||||||
|
"timestamp": "2020-04-30T11:09:51+02:00",
|
||||||
|
"tree_id": "a8188bb8b0af6309ae6936a4a7e5d0ffe44c0b3c",
|
||||||
|
"url": "https://github.com/garronej/test-repo/commit/36deb3a7cc241cfba71daceaa6efa80cbdc5e93e"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"compare": "https://github.com/garronej/test-repo/compare/3cac089f0b03...36deb3a7cc24",
|
||||||
|
"created": false,
|
||||||
|
"deleted": false,
|
||||||
|
"forced": false,
|
||||||
|
"head_commit": {
|
||||||
|
"author": {
|
||||||
|
"email": "joseph@semasim.com",
|
||||||
|
"name": "Garrone Joseph",
|
||||||
|
"username": "garronej"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"email": "noreply@github.com",
|
||||||
|
"name": "GitHub",
|
||||||
|
"username": "web-flow"
|
||||||
|
},
|
||||||
|
"distinct": true,
|
||||||
|
"id": "36deb3a7cc241cfba71daceaa6efa80cbdc5e93e",
|
||||||
|
"message": "Merge pull request #3 from garronej/garronej-patch-4\n\ncommit for pull request 4",
|
||||||
|
"timestamp": "2020-04-30T11:09:51+02:00",
|
||||||
|
"tree_id": "a8188bb8b0af6309ae6936a4a7e5d0ffe44c0b3c",
|
||||||
|
"url": "https://github.com/garronej/test-repo/commit/36deb3a7cc241cfba71daceaa6efa80cbdc5e93e"
|
||||||
|
},
|
||||||
|
"pusher": {
|
||||||
|
"email": "joseph.garrone@ensimag.grenoble-inp.fr",
|
||||||
|
"name": "garronej"
|
||||||
|
},
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"repository": {
|
||||||
|
"archive_url": "https://api.github.com/repos/garronej/test-repo/{archive_format}{/ref}",
|
||||||
|
"archived": false,
|
||||||
|
"assignees_url": "https://api.github.com/repos/garronej/test-repo/assignees{/user}",
|
||||||
|
"blobs_url": "https://api.github.com/repos/garronej/test-repo/git/blobs{/sha}",
|
||||||
|
"branches_url": "https://api.github.com/repos/garronej/test-repo/branches{/branch}",
|
||||||
|
"clone_url": "https://github.com/garronej/test-repo.git",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/garronej/test-repo/collaborators{/collaborator}",
|
||||||
|
"comments_url": "https://api.github.com/repos/garronej/test-repo/comments{/number}",
|
||||||
|
"commits_url": "https://api.github.com/repos/garronej/test-repo/commits{/sha}",
|
||||||
|
"compare_url": "https://api.github.com/repos/garronej/test-repo/compare/{base}...{head}",
|
||||||
|
"contents_url": "https://api.github.com/repos/garronej/test-repo/contents/{+path}",
|
||||||
|
"contributors_url": "https://api.github.com/repos/garronej/test-repo/contributors",
|
||||||
|
"created_at": 1587710837,
|
||||||
|
"default_branch": "master",
|
||||||
|
"deployments_url": "https://api.github.com/repos/garronej/test-repo/deployments",
|
||||||
|
"description": "Alors ? ",
|
||||||
|
"disabled": false,
|
||||||
|
"downloads_url": "https://api.github.com/repos/garronej/test-repo/downloads",
|
||||||
|
"events_url": "https://api.github.com/repos/garronej/test-repo/events",
|
||||||
|
"fork": false,
|
||||||
|
"forks": 1,
|
||||||
|
"forks_count": 1,
|
||||||
|
"forks_url": "https://api.github.com/repos/garronej/test-repo/forks",
|
||||||
|
"full_name": "garronej/test-repo",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/garronej/test-repo/git/commits{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/garronej/test-repo/git/refs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/garronej/test-repo/git/tags{/sha}",
|
||||||
|
"git_url": "git://github.com/garronej/test-repo.git",
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_issues": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"homepage": "",
|
||||||
|
"hooks_url": "https://api.github.com/repos/garronej/test-repo/hooks",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo",
|
||||||
|
"id": 258429883,
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/garronej/test-repo/issues/comments{/number}",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/garronej/test-repo/issues/events{/number}",
|
||||||
|
"issues_url": "https://api.github.com/repos/garronej/test-repo/issues{/number}",
|
||||||
|
"keys_url": "https://api.github.com/repos/garronej/test-repo/keys{/key_id}",
|
||||||
|
"labels_url": "https://api.github.com/repos/garronej/test-repo/labels{/name}",
|
||||||
|
"language": null,
|
||||||
|
"languages_url": "https://api.github.com/repos/garronej/test-repo/languages",
|
||||||
|
"license": null,
|
||||||
|
"master_branch": "master",
|
||||||
|
"merges_url": "https://api.github.com/repos/garronej/test-repo/merges",
|
||||||
|
"milestones_url": "https://api.github.com/repos/garronej/test-repo/milestones{/number}",
|
||||||
|
"mirror_url": null,
|
||||||
|
"name": "test-repo",
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkyNTg0Mjk4ODM=",
|
||||||
|
"notifications_url": "https://api.github.com/repos/garronej/test-repo/notifications{?since,all,participating}",
|
||||||
|
"open_issues": 0,
|
||||||
|
"open_issues_count": 0,
|
||||||
|
"owner": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"email": "joseph.garrone@ensimag.grenoble-inp.fr",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"name": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
},
|
||||||
|
"private": false,
|
||||||
|
"pulls_url": "https://api.github.com/repos/garronej/test-repo/pulls{/number}",
|
||||||
|
"pushed_at": 1588237792,
|
||||||
|
"releases_url": "https://api.github.com/repos/garronej/test-repo/releases{/id}",
|
||||||
|
"size": 31,
|
||||||
|
"ssh_url": "git@github.com:garronej/test-repo.git",
|
||||||
|
"stargazers": 1,
|
||||||
|
"stargazers_count": 1,
|
||||||
|
"stargazers_url": "https://api.github.com/repos/garronej/test-repo/stargazers",
|
||||||
|
"statuses_url": "https://api.github.com/repos/garronej/test-repo/statuses/{sha}",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/garronej/test-repo/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/garronej/test-repo/subscription",
|
||||||
|
"svn_url": "https://github.com/garronej/test-repo",
|
||||||
|
"tags_url": "https://api.github.com/repos/garronej/test-repo/tags",
|
||||||
|
"teams_url": "https://api.github.com/repos/garronej/test-repo/teams",
|
||||||
|
"trees_url": "https://api.github.com/repos/garronej/test-repo/git/trees{/sha}",
|
||||||
|
"updated_at": "2020-04-30T09:00:23Z",
|
||||||
|
"url": "https://github.com/garronej/test-repo",
|
||||||
|
"watchers": 1,
|
||||||
|
"watchers_count": 1
|
||||||
|
},
|
||||||
|
"sender": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"workspace": "/home/runner/work/test-repo/test-repo",
|
||||||
|
"action": "run2",
|
||||||
|
"event_path": "/home/runner/work/_temp/_github_workflow/event.json"
|
||||||
|
}
|
||||||
223
res/pr_closed_not_merged.json
Normal file
223
res/pr_closed_not_merged.json
Normal file
|
|
@ -0,0 +1,223 @@
|
||||||
|
{
|
||||||
|
"url": "https://api.github.com/repos/denoland/deno_website2/pulls/243",
|
||||||
|
"id": 376901639,
|
||||||
|
"node_id": "MDExOlB1bGxSZXF1ZXN0Mzc2OTAxNjM5",
|
||||||
|
"html_url": "https://github.com/denoland/deno_website2/pull/243",
|
||||||
|
"diff_url": "https://github.com/denoland/deno_website2/pull/243.diff",
|
||||||
|
"patch_url": "https://github.com/denoland/deno_website2/pull/243.patch",
|
||||||
|
"issue_url": "https://api.github.com/repos/denoland/deno_website2/issues/243",
|
||||||
|
"number": 243,
|
||||||
|
"state": "closed",
|
||||||
|
"locked": false,
|
||||||
|
"title": "Update database.json",
|
||||||
|
"user": {
|
||||||
|
"login": "ebebbington",
|
||||||
|
"id": 47337480,
|
||||||
|
"node_id": "MDQ6VXNlcjQ3MzM3NDgw",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/47337480?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/ebebbington",
|
||||||
|
"html_url": "https://github.com/ebebbington",
|
||||||
|
"followers_url": "https://api.github.com/users/ebebbington/followers",
|
||||||
|
"following_url": "https://api.github.com/users/ebebbington/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/ebebbington/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/ebebbington/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/ebebbington/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/ebebbington/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/ebebbington/repos",
|
||||||
|
"events_url": "https://api.github.com/users/ebebbington/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/ebebbington/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"body": "",
|
||||||
|
"created_at": "2020-02-19T00:19:16Z",
|
||||||
|
"updated_at": "2020-02-19T01:36:47Z",
|
||||||
|
"closed_at": "2020-02-19T01:36:47Z",
|
||||||
|
"merged_at": null,
|
||||||
|
"merge_commit_sha": "3c2466b5531ca936a4298e289e2fd0be21113243",
|
||||||
|
"assignee": null,
|
||||||
|
"assignees": [],
|
||||||
|
"requested_reviewers": [],
|
||||||
|
"requested_teams": [],
|
||||||
|
"labels": [],
|
||||||
|
"milestone": null,
|
||||||
|
"draft": false,
|
||||||
|
"commits_url": "https://api.github.com/repos/denoland/deno_website2/pulls/243/commits",
|
||||||
|
"review_comments_url": "https://api.github.com/repos/denoland/deno_website2/pulls/243/comments",
|
||||||
|
"review_comment_url": "https://api.github.com/repos/denoland/deno_website2/pulls/comments{/number}",
|
||||||
|
"comments_url": "https://api.github.com/repos/denoland/deno_website2/issues/243/comments",
|
||||||
|
"statuses_url": "https://api.github.com/repos/denoland/deno_website2/statuses/dd984adce147336ebe4e3f5c87f5bb256c710d2a",
|
||||||
|
"head": {
|
||||||
|
"label": "ebebbington:patch-1",
|
||||||
|
"ref": "patch-1",
|
||||||
|
"sha": "dd984adce147336ebe4e3f5c87f5bb256c710d2a",
|
||||||
|
"user": {
|
||||||
|
"login": "ebebbington",
|
||||||
|
"id": 47337480,
|
||||||
|
"node_id": "MDQ6VXNlcjQ3MzM3NDgw",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/47337480?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/ebebbington",
|
||||||
|
"html_url": "https://github.com/ebebbington",
|
||||||
|
"followers_url": "https://api.github.com/users/ebebbington/followers",
|
||||||
|
"following_url": "https://api.github.com/users/ebebbington/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/ebebbington/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/ebebbington/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/ebebbington/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/ebebbington/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/ebebbington/repos",
|
||||||
|
"events_url": "https://api.github.com/users/ebebbington/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/ebebbington/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"repo": null
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"label": "denoland:master",
|
||||||
|
"ref": "master",
|
||||||
|
"sha": "a1fd79e283995341830c0864e2282146fe604401",
|
||||||
|
"user": {
|
||||||
|
"login": "denoland",
|
||||||
|
"id": 42048915,
|
||||||
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjQyMDQ4OTE1",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/42048915?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/denoland",
|
||||||
|
"html_url": "https://github.com/denoland",
|
||||||
|
"followers_url": "https://api.github.com/users/denoland/followers",
|
||||||
|
"following_url": "https://api.github.com/users/denoland/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/denoland/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/denoland/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/denoland/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/denoland/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/denoland/repos",
|
||||||
|
"events_url": "https://api.github.com/users/denoland/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/denoland/received_events",
|
||||||
|
"type": "Organization",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"id": 216156518,
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkyMTYxNTY1MTg=",
|
||||||
|
"name": "deno_website2",
|
||||||
|
"full_name": "denoland/deno_website2",
|
||||||
|
"private": false,
|
||||||
|
"owner": {
|
||||||
|
"login": "denoland",
|
||||||
|
"id": 42048915,
|
||||||
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjQyMDQ4OTE1",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/42048915?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/denoland",
|
||||||
|
"html_url": "https://github.com/denoland",
|
||||||
|
"followers_url": "https://api.github.com/users/denoland/followers",
|
||||||
|
"following_url": "https://api.github.com/users/denoland/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/denoland/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/denoland/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/denoland/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/denoland/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/denoland/repos",
|
||||||
|
"events_url": "https://api.github.com/users/denoland/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/denoland/received_events",
|
||||||
|
"type": "Organization",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"html_url": "https://github.com/denoland/deno_website2",
|
||||||
|
"description": "deno.land website ",
|
||||||
|
"fork": false,
|
||||||
|
"url": "https://api.github.com/repos/denoland/deno_website2",
|
||||||
|
"forks_url": "https://api.github.com/repos/denoland/deno_website2/forks",
|
||||||
|
"keys_url": "https://api.github.com/repos/denoland/deno_website2/keys{/key_id}",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/denoland/deno_website2/collaborators{/collaborator}",
|
||||||
|
"teams_url": "https://api.github.com/repos/denoland/deno_website2/teams",
|
||||||
|
"hooks_url": "https://api.github.com/repos/denoland/deno_website2/hooks",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/denoland/deno_website2/issues/events{/number}",
|
||||||
|
"events_url": "https://api.github.com/repos/denoland/deno_website2/events",
|
||||||
|
"assignees_url": "https://api.github.com/repos/denoland/deno_website2/assignees{/user}",
|
||||||
|
"branches_url": "https://api.github.com/repos/denoland/deno_website2/branches{/branch}",
|
||||||
|
"tags_url": "https://api.github.com/repos/denoland/deno_website2/tags",
|
||||||
|
"blobs_url": "https://api.github.com/repos/denoland/deno_website2/git/blobs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/denoland/deno_website2/git/tags{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/denoland/deno_website2/git/refs{/sha}",
|
||||||
|
"trees_url": "https://api.github.com/repos/denoland/deno_website2/git/trees{/sha}",
|
||||||
|
"statuses_url": "https://api.github.com/repos/denoland/deno_website2/statuses/{sha}",
|
||||||
|
"languages_url": "https://api.github.com/repos/denoland/deno_website2/languages",
|
||||||
|
"stargazers_url": "https://api.github.com/repos/denoland/deno_website2/stargazers",
|
||||||
|
"contributors_url": "https://api.github.com/repos/denoland/deno_website2/contributors",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/denoland/deno_website2/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/denoland/deno_website2/subscription",
|
||||||
|
"commits_url": "https://api.github.com/repos/denoland/deno_website2/commits{/sha}",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/denoland/deno_website2/git/commits{/sha}",
|
||||||
|
"comments_url": "https://api.github.com/repos/denoland/deno_website2/comments{/number}",
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/denoland/deno_website2/issues/comments{/number}",
|
||||||
|
"contents_url": "https://api.github.com/repos/denoland/deno_website2/contents/{+path}",
|
||||||
|
"compare_url": "https://api.github.com/repos/denoland/deno_website2/compare/{base}...{head}",
|
||||||
|
"merges_url": "https://api.github.com/repos/denoland/deno_website2/merges",
|
||||||
|
"archive_url": "https://api.github.com/repos/denoland/deno_website2/{archive_format}{/ref}",
|
||||||
|
"downloads_url": "https://api.github.com/repos/denoland/deno_website2/downloads",
|
||||||
|
"issues_url": "https://api.github.com/repos/denoland/deno_website2/issues{/number}",
|
||||||
|
"pulls_url": "https://api.github.com/repos/denoland/deno_website2/pulls{/number}",
|
||||||
|
"milestones_url": "https://api.github.com/repos/denoland/deno_website2/milestones{/number}",
|
||||||
|
"notifications_url": "https://api.github.com/repos/denoland/deno_website2/notifications{?since,all,participating}",
|
||||||
|
"labels_url": "https://api.github.com/repos/denoland/deno_website2/labels{/name}",
|
||||||
|
"releases_url": "https://api.github.com/repos/denoland/deno_website2/releases{/id}",
|
||||||
|
"deployments_url": "https://api.github.com/repos/denoland/deno_website2/deployments",
|
||||||
|
"created_at": "2019-10-19T05:53:43Z",
|
||||||
|
"updated_at": "2020-05-12T22:28:15Z",
|
||||||
|
"pushed_at": "2020-05-12T22:35:23Z",
|
||||||
|
"git_url": "git://github.com/denoland/deno_website2.git",
|
||||||
|
"ssh_url": "git@github.com:denoland/deno_website2.git",
|
||||||
|
"clone_url": "https://github.com/denoland/deno_website2.git",
|
||||||
|
"svn_url": "https://github.com/denoland/deno_website2",
|
||||||
|
"homepage": "https://deno.land/",
|
||||||
|
"size": 1517,
|
||||||
|
"stargazers_count": 187,
|
||||||
|
"watchers_count": 187,
|
||||||
|
"language": "TypeScript",
|
||||||
|
"has_issues": true,
|
||||||
|
"has_projects": false,
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_wiki": false,
|
||||||
|
"has_pages": false,
|
||||||
|
"forks_count": 131,
|
||||||
|
"mirror_url": null,
|
||||||
|
"archived": false,
|
||||||
|
"disabled": false,
|
||||||
|
"open_issues_count": 33,
|
||||||
|
"license": null,
|
||||||
|
"forks": 131,
|
||||||
|
"open_issues": 33,
|
||||||
|
"watchers": 187,
|
||||||
|
"default_branch": "master"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"_links": {
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/243"
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"href": "https://github.com/denoland/deno_website2/pull/243"
|
||||||
|
},
|
||||||
|
"issue": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/issues/243"
|
||||||
|
},
|
||||||
|
"comments": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/issues/243/comments"
|
||||||
|
},
|
||||||
|
"review_comments": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/243/comments"
|
||||||
|
},
|
||||||
|
"review_comment": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/comments{/number}"
|
||||||
|
},
|
||||||
|
"commits": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/243/commits"
|
||||||
|
},
|
||||||
|
"statuses": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/statuses/dd984adce147336ebe4e3f5c87f5bb256c710d2a"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"author_association": "CONTRIBUTOR"
|
||||||
|
}
|
||||||
469
res/pull_request.json
Normal file
469
res/pull_request.json
Normal file
|
|
@ -0,0 +1,469 @@
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"token": "***",
|
||||||
|
"job": "test",
|
||||||
|
"ref": "refs/pull/3/merge",
|
||||||
|
"sha": "edd8d31fc8584fd040a33fa234a4e173cde5e988",
|
||||||
|
"repository": "garronej/test-repo",
|
||||||
|
"repository_owner": "garronej",
|
||||||
|
"repositoryUrl": "git://github.com/garronej/test-repo.git",
|
||||||
|
"run_id": "91983605",
|
||||||
|
"run_number": "9",
|
||||||
|
"actor": "garronej",
|
||||||
|
"workflow": "the workflow name",
|
||||||
|
"head_ref": "garronej-patch-4",
|
||||||
|
"base_ref": "master",
|
||||||
|
"event_name": "pull_request",
|
||||||
|
"event": {
|
||||||
|
"action": "synchronize",
|
||||||
|
"after": "e3788c6b40c0d017f2422f64193753d47d240471",
|
||||||
|
"before": "dd23ceb8c0002b80ca146cc2993acfd1da3c147a",
|
||||||
|
"number": 3,
|
||||||
|
"pull_request": {
|
||||||
|
"_links": {
|
||||||
|
"comments": {
|
||||||
|
"href": "https://api.github.com/repos/garronej/test-repo/issues/3/comments"
|
||||||
|
},
|
||||||
|
"commits": {
|
||||||
|
"href": "https://api.github.com/repos/garronej/test-repo/pulls/3/commits"
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"href": "https://github.com/garronej/test-repo/pull/3"
|
||||||
|
},
|
||||||
|
"issue": {
|
||||||
|
"href": "https://api.github.com/repos/garronej/test-repo/issues/3"
|
||||||
|
},
|
||||||
|
"review_comment": {
|
||||||
|
"href": "https://api.github.com/repos/garronej/test-repo/pulls/comments{/number}"
|
||||||
|
},
|
||||||
|
"review_comments": {
|
||||||
|
"href": "https://api.github.com/repos/garronej/test-repo/pulls/3/comments"
|
||||||
|
},
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.github.com/repos/garronej/test-repo/pulls/3"
|
||||||
|
},
|
||||||
|
"statuses": {
|
||||||
|
"href": "https://api.github.com/repos/garronej/test-repo/statuses/e3788c6b40c0d017f2422f64193753d47d240471"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additions": 4,
|
||||||
|
"assignee": null,
|
||||||
|
"assignees": [],
|
||||||
|
"author_association": "OWNER",
|
||||||
|
"base": {
|
||||||
|
"label": "garronej:master",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": {
|
||||||
|
"archive_url": "https://api.github.com/repos/garronej/test-repo/{archive_format}{/ref}",
|
||||||
|
"archived": false,
|
||||||
|
"assignees_url": "https://api.github.com/repos/garronej/test-repo/assignees{/user}",
|
||||||
|
"blobs_url": "https://api.github.com/repos/garronej/test-repo/git/blobs{/sha}",
|
||||||
|
"branches_url": "https://api.github.com/repos/garronej/test-repo/branches{/branch}",
|
||||||
|
"clone_url": "https://github.com/garronej/test-repo.git",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/garronej/test-repo/collaborators{/collaborator}",
|
||||||
|
"comments_url": "https://api.github.com/repos/garronej/test-repo/comments{/number}",
|
||||||
|
"commits_url": "https://api.github.com/repos/garronej/test-repo/commits{/sha}",
|
||||||
|
"compare_url": "https://api.github.com/repos/garronej/test-repo/compare/{base}...{head}",
|
||||||
|
"contents_url": "https://api.github.com/repos/garronej/test-repo/contents/{+path}",
|
||||||
|
"contributors_url": "https://api.github.com/repos/garronej/test-repo/contributors",
|
||||||
|
"created_at": "2020-04-24T06:47:17Z",
|
||||||
|
"default_branch": "master",
|
||||||
|
"deployments_url": "https://api.github.com/repos/garronej/test-repo/deployments",
|
||||||
|
"description": "Alors ? ",
|
||||||
|
"disabled": false,
|
||||||
|
"downloads_url": "https://api.github.com/repos/garronej/test-repo/downloads",
|
||||||
|
"events_url": "https://api.github.com/repos/garronej/test-repo/events",
|
||||||
|
"fork": false,
|
||||||
|
"forks": 1,
|
||||||
|
"forks_count": 1,
|
||||||
|
"forks_url": "https://api.github.com/repos/garronej/test-repo/forks",
|
||||||
|
"full_name": "garronej/test-repo",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/garronej/test-repo/git/commits{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/garronej/test-repo/git/refs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/garronej/test-repo/git/tags{/sha}",
|
||||||
|
"git_url": "git://github.com/garronej/test-repo.git",
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_issues": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"homepage": "",
|
||||||
|
"hooks_url": "https://api.github.com/repos/garronej/test-repo/hooks",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo",
|
||||||
|
"id": 258429883,
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/garronej/test-repo/issues/comments{/number}",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/garronej/test-repo/issues/events{/number}",
|
||||||
|
"issues_url": "https://api.github.com/repos/garronej/test-repo/issues{/number}",
|
||||||
|
"keys_url": "https://api.github.com/repos/garronej/test-repo/keys{/key_id}",
|
||||||
|
"labels_url": "https://api.github.com/repos/garronej/test-repo/labels{/name}",
|
||||||
|
"language": null,
|
||||||
|
"languages_url": "https://api.github.com/repos/garronej/test-repo/languages",
|
||||||
|
"license": null,
|
||||||
|
"merges_url": "https://api.github.com/repos/garronej/test-repo/merges",
|
||||||
|
"milestones_url": "https://api.github.com/repos/garronej/test-repo/milestones{/number}",
|
||||||
|
"mirror_url": null,
|
||||||
|
"name": "test-repo",
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkyNTg0Mjk4ODM=",
|
||||||
|
"notifications_url": "https://api.github.com/repos/garronej/test-repo/notifications{?since,all,participating}",
|
||||||
|
"open_issues": 1,
|
||||||
|
"open_issues_count": 1,
|
||||||
|
"owner": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
},
|
||||||
|
"private": false,
|
||||||
|
"pulls_url": "https://api.github.com/repos/garronej/test-repo/pulls{/number}",
|
||||||
|
"pushed_at": "2020-04-30T09:02:25Z",
|
||||||
|
"releases_url": "https://api.github.com/repos/garronej/test-repo/releases{/id}",
|
||||||
|
"size": 31,
|
||||||
|
"ssh_url": "git@github.com:garronej/test-repo.git",
|
||||||
|
"stargazers_count": 1,
|
||||||
|
"stargazers_url": "https://api.github.com/repos/garronej/test-repo/stargazers",
|
||||||
|
"statuses_url": "https://api.github.com/repos/garronej/test-repo/statuses/{sha}",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/garronej/test-repo/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/garronej/test-repo/subscription",
|
||||||
|
"svn_url": "https://github.com/garronej/test-repo",
|
||||||
|
"tags_url": "https://api.github.com/repos/garronej/test-repo/tags",
|
||||||
|
"teams_url": "https://api.github.com/repos/garronej/test-repo/teams",
|
||||||
|
"trees_url": "https://api.github.com/repos/garronej/test-repo/git/trees{/sha}",
|
||||||
|
"updated_at": "2020-04-30T09:00:23Z",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo",
|
||||||
|
"watchers": 1,
|
||||||
|
"watchers_count": 1
|
||||||
|
},
|
||||||
|
"sha": "3cac089f0b03951b610a389564198f53fb485579",
|
||||||
|
"user": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"body": "",
|
||||||
|
"changed_files": 1,
|
||||||
|
"closed_at": null,
|
||||||
|
"comments": 0,
|
||||||
|
"comments_url": "https://api.github.com/repos/garronej/test-repo/issues/3/comments",
|
||||||
|
"commits": 2,
|
||||||
|
"commits_url": "https://api.github.com/repos/garronej/test-repo/pulls/3/commits",
|
||||||
|
"created_at": "2020-04-30T09:00:35Z",
|
||||||
|
"deletions": 1,
|
||||||
|
"diff_url": "https://github.com/garronej/test-repo/pull/3.diff",
|
||||||
|
"draft": false,
|
||||||
|
"head": {
|
||||||
|
"label": "garronej:garronej-patch-4",
|
||||||
|
"ref": "garronej-patch-4",
|
||||||
|
"repo": {
|
||||||
|
"archive_url": "https://api.github.com/repos/garronej/test-repo/{archive_format}{/ref}",
|
||||||
|
"archived": false,
|
||||||
|
"assignees_url": "https://api.github.com/repos/garronej/test-repo/assignees{/user}",
|
||||||
|
"blobs_url": "https://api.github.com/repos/garronej/test-repo/git/blobs{/sha}",
|
||||||
|
"branches_url": "https://api.github.com/repos/garronej/test-repo/branches{/branch}",
|
||||||
|
"clone_url": "https://github.com/garronej/test-repo.git",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/garronej/test-repo/collaborators{/collaborator}",
|
||||||
|
"comments_url": "https://api.github.com/repos/garronej/test-repo/comments{/number}",
|
||||||
|
"commits_url": "https://api.github.com/repos/garronej/test-repo/commits{/sha}",
|
||||||
|
"compare_url": "https://api.github.com/repos/garronej/test-repo/compare/{base}...{head}",
|
||||||
|
"contents_url": "https://api.github.com/repos/garronej/test-repo/contents/{+path}",
|
||||||
|
"contributors_url": "https://api.github.com/repos/garronej/test-repo/contributors",
|
||||||
|
"created_at": "2020-04-24T06:47:17Z",
|
||||||
|
"default_branch": "master",
|
||||||
|
"deployments_url": "https://api.github.com/repos/garronej/test-repo/deployments",
|
||||||
|
"description": "Alors ? ",
|
||||||
|
"disabled": false,
|
||||||
|
"downloads_url": "https://api.github.com/repos/garronej/test-repo/downloads",
|
||||||
|
"events_url": "https://api.github.com/repos/garronej/test-repo/events",
|
||||||
|
"fork": false,
|
||||||
|
"forks": 1,
|
||||||
|
"forks_count": 1,
|
||||||
|
"forks_url": "https://api.github.com/repos/garronej/test-repo/forks",
|
||||||
|
"full_name": "garronej/test-repo",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/garronej/test-repo/git/commits{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/garronej/test-repo/git/refs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/garronej/test-repo/git/tags{/sha}",
|
||||||
|
"git_url": "git://github.com/garronej/test-repo.git",
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_issues": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"homepage": "",
|
||||||
|
"hooks_url": "https://api.github.com/repos/garronej/test-repo/hooks",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo",
|
||||||
|
"id": 258429883,
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/garronej/test-repo/issues/comments{/number}",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/garronej/test-repo/issues/events{/number}",
|
||||||
|
"issues_url": "https://api.github.com/repos/garronej/test-repo/issues{/number}",
|
||||||
|
"keys_url": "https://api.github.com/repos/garronej/test-repo/keys{/key_id}",
|
||||||
|
"labels_url": "https://api.github.com/repos/garronej/test-repo/labels{/name}",
|
||||||
|
"language": null,
|
||||||
|
"languages_url": "https://api.github.com/repos/garronej/test-repo/languages",
|
||||||
|
"license": null,
|
||||||
|
"merges_url": "https://api.github.com/repos/garronej/test-repo/merges",
|
||||||
|
"milestones_url": "https://api.github.com/repos/garronej/test-repo/milestones{/number}",
|
||||||
|
"mirror_url": null,
|
||||||
|
"name": "test-repo",
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkyNTg0Mjk4ODM=",
|
||||||
|
"notifications_url": "https://api.github.com/repos/garronej/test-repo/notifications{?since,all,participating}",
|
||||||
|
"open_issues": 1,
|
||||||
|
"open_issues_count": 1,
|
||||||
|
"owner": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
},
|
||||||
|
"private": false,
|
||||||
|
"pulls_url": "https://api.github.com/repos/garronej/test-repo/pulls{/number}",
|
||||||
|
"pushed_at": "2020-04-30T09:02:25Z",
|
||||||
|
"releases_url": "https://api.github.com/repos/garronej/test-repo/releases{/id}",
|
||||||
|
"size": 31,
|
||||||
|
"ssh_url": "git@github.com:garronej/test-repo.git",
|
||||||
|
"stargazers_count": 1,
|
||||||
|
"stargazers_url": "https://api.github.com/repos/garronej/test-repo/stargazers",
|
||||||
|
"statuses_url": "https://api.github.com/repos/garronej/test-repo/statuses/{sha}",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/garronej/test-repo/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/garronej/test-repo/subscription",
|
||||||
|
"svn_url": "https://github.com/garronej/test-repo",
|
||||||
|
"tags_url": "https://api.github.com/repos/garronej/test-repo/tags",
|
||||||
|
"teams_url": "https://api.github.com/repos/garronej/test-repo/teams",
|
||||||
|
"trees_url": "https://api.github.com/repos/garronej/test-repo/git/trees{/sha}",
|
||||||
|
"updated_at": "2020-04-30T09:00:23Z",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo",
|
||||||
|
"watchers": 1,
|
||||||
|
"watchers_count": 1
|
||||||
|
},
|
||||||
|
"sha": "e3788c6b40c0d017f2422f64193753d47d240471",
|
||||||
|
"user": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"html_url": "https://github.com/garronej/test-repo/pull/3",
|
||||||
|
"id": 411270304,
|
||||||
|
"issue_url": "https://api.github.com/repos/garronej/test-repo/issues/3",
|
||||||
|
"labels": [],
|
||||||
|
"locked": false,
|
||||||
|
"maintainer_can_modify": false,
|
||||||
|
"merge_commit_sha": null,
|
||||||
|
"mergeable": null,
|
||||||
|
"mergeable_state": "unknown",
|
||||||
|
"merged": false,
|
||||||
|
"merged_at": null,
|
||||||
|
"merged_by": null,
|
||||||
|
"milestone": null,
|
||||||
|
"node_id": "MDExOlB1bGxSZXF1ZXN0NDExMjcwMzA0",
|
||||||
|
"number": 3,
|
||||||
|
"patch_url": "https://github.com/garronej/test-repo/pull/3.patch",
|
||||||
|
"rebaseable": null,
|
||||||
|
"requested_reviewers": [],
|
||||||
|
"requested_teams": [],
|
||||||
|
"review_comment_url": "https://api.github.com/repos/garronej/test-repo/pulls/comments{/number}",
|
||||||
|
"review_comments": 0,
|
||||||
|
"review_comments_url": "https://api.github.com/repos/garronej/test-repo/pulls/3/comments",
|
||||||
|
"state": "open",
|
||||||
|
"statuses_url": "https://api.github.com/repos/garronej/test-repo/statuses/e3788c6b40c0d017f2422f64193753d47d240471",
|
||||||
|
"title": "commit for pull request 4",
|
||||||
|
"updated_at": "2020-04-30T09:02:26Z",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo/pulls/3",
|
||||||
|
"user": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"archive_url": "https://api.github.com/repos/garronej/test-repo/{archive_format}{/ref}",
|
||||||
|
"archived": false,
|
||||||
|
"assignees_url": "https://api.github.com/repos/garronej/test-repo/assignees{/user}",
|
||||||
|
"blobs_url": "https://api.github.com/repos/garronej/test-repo/git/blobs{/sha}",
|
||||||
|
"branches_url": "https://api.github.com/repos/garronej/test-repo/branches{/branch}",
|
||||||
|
"clone_url": "https://github.com/garronej/test-repo.git",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/garronej/test-repo/collaborators{/collaborator}",
|
||||||
|
"comments_url": "https://api.github.com/repos/garronej/test-repo/comments{/number}",
|
||||||
|
"commits_url": "https://api.github.com/repos/garronej/test-repo/commits{/sha}",
|
||||||
|
"compare_url": "https://api.github.com/repos/garronej/test-repo/compare/{base}...{head}",
|
||||||
|
"contents_url": "https://api.github.com/repos/garronej/test-repo/contents/{+path}",
|
||||||
|
"contributors_url": "https://api.github.com/repos/garronej/test-repo/contributors",
|
||||||
|
"created_at": "2020-04-24T06:47:17Z",
|
||||||
|
"default_branch": "master",
|
||||||
|
"deployments_url": "https://api.github.com/repos/garronej/test-repo/deployments",
|
||||||
|
"description": "Alors ? ",
|
||||||
|
"disabled": false,
|
||||||
|
"downloads_url": "https://api.github.com/repos/garronej/test-repo/downloads",
|
||||||
|
"events_url": "https://api.github.com/repos/garronej/test-repo/events",
|
||||||
|
"fork": false,
|
||||||
|
"forks": 1,
|
||||||
|
"forks_count": 1,
|
||||||
|
"forks_url": "https://api.github.com/repos/garronej/test-repo/forks",
|
||||||
|
"full_name": "garronej/test-repo",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/garronej/test-repo/git/commits{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/garronej/test-repo/git/refs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/garronej/test-repo/git/tags{/sha}",
|
||||||
|
"git_url": "git://github.com/garronej/test-repo.git",
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_issues": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"homepage": "",
|
||||||
|
"hooks_url": "https://api.github.com/repos/garronej/test-repo/hooks",
|
||||||
|
"html_url": "https://github.com/garronej/test-repo",
|
||||||
|
"id": 258429883,
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/garronej/test-repo/issues/comments{/number}",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/garronej/test-repo/issues/events{/number}",
|
||||||
|
"issues_url": "https://api.github.com/repos/garronej/test-repo/issues{/number}",
|
||||||
|
"keys_url": "https://api.github.com/repos/garronej/test-repo/keys{/key_id}",
|
||||||
|
"labels_url": "https://api.github.com/repos/garronej/test-repo/labels{/name}",
|
||||||
|
"language": null,
|
||||||
|
"languages_url": "https://api.github.com/repos/garronej/test-repo/languages",
|
||||||
|
"license": null,
|
||||||
|
"merges_url": "https://api.github.com/repos/garronej/test-repo/merges",
|
||||||
|
"milestones_url": "https://api.github.com/repos/garronej/test-repo/milestones{/number}",
|
||||||
|
"mirror_url": null,
|
||||||
|
"name": "test-repo",
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkyNTg0Mjk4ODM=",
|
||||||
|
"notifications_url": "https://api.github.com/repos/garronej/test-repo/notifications{?since,all,participating}",
|
||||||
|
"open_issues": 1,
|
||||||
|
"open_issues_count": 1,
|
||||||
|
"owner": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
},
|
||||||
|
"private": false,
|
||||||
|
"pulls_url": "https://api.github.com/repos/garronej/test-repo/pulls{/number}",
|
||||||
|
"pushed_at": "2020-04-30T09:02:25Z",
|
||||||
|
"releases_url": "https://api.github.com/repos/garronej/test-repo/releases{/id}",
|
||||||
|
"size": 31,
|
||||||
|
"ssh_url": "git@github.com:garronej/test-repo.git",
|
||||||
|
"stargazers_count": 1,
|
||||||
|
"stargazers_url": "https://api.github.com/repos/garronej/test-repo/stargazers",
|
||||||
|
"statuses_url": "https://api.github.com/repos/garronej/test-repo/statuses/{sha}",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/garronej/test-repo/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/garronej/test-repo/subscription",
|
||||||
|
"svn_url": "https://github.com/garronej/test-repo",
|
||||||
|
"tags_url": "https://api.github.com/repos/garronej/test-repo/tags",
|
||||||
|
"teams_url": "https://api.github.com/repos/garronej/test-repo/teams",
|
||||||
|
"trees_url": "https://api.github.com/repos/garronej/test-repo/git/trees{/sha}",
|
||||||
|
"updated_at": "2020-04-30T09:00:23Z",
|
||||||
|
"url": "https://api.github.com/repos/garronej/test-repo",
|
||||||
|
"watchers": 1,
|
||||||
|
"watchers_count": 1
|
||||||
|
},
|
||||||
|
"sender": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"workspace": "/home/runner/work/test-repo/test-repo",
|
||||||
|
"action": "run2",
|
||||||
|
"event_path": "/home/runner/work/_temp/_github_workflow/event.json"
|
||||||
|
}
|
||||||
185
res/push_from_denoify_ci.json
Normal file
185
res/push_from_denoify_ci.json
Normal file
|
|
@ -0,0 +1,185 @@
|
||||||
|
|
||||||
|
{
|
||||||
|
"token": "***",
|
||||||
|
"job": "test_node",
|
||||||
|
"ref": "refs/heads/dev",
|
||||||
|
"sha": "0e848524bf10b4896a939364d27afa2cd459a506",
|
||||||
|
"repository": "garronej/super_waffle",
|
||||||
|
"repository_owner": "garronej",
|
||||||
|
"repositoryUrl": "git://github.com/garronej/super_waffle.git",
|
||||||
|
"run_id": "102085103",
|
||||||
|
"run_number": "4",
|
||||||
|
"actor": "garronej",
|
||||||
|
"workflow": "ci",
|
||||||
|
"head_ref": "",
|
||||||
|
"base_ref": "",
|
||||||
|
"event_name": "push",
|
||||||
|
"event": {
|
||||||
|
"after": "0e848524bf10b4896a939364d27afa2cd459a506",
|
||||||
|
"base_ref": null,
|
||||||
|
"before": "6265951bf62040cca203c93b92fabf1b6a8a8711",
|
||||||
|
"commits": [
|
||||||
|
{
|
||||||
|
"author": {
|
||||||
|
"email": "denoify_ci@github.com",
|
||||||
|
"name": "denoify_ci"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"email": "denoify_ci@github.com",
|
||||||
|
"name": "denoify_ci"
|
||||||
|
},
|
||||||
|
"distinct": true,
|
||||||
|
"id": "0e848524bf10b4896a939364d27afa2cd459a506",
|
||||||
|
"message": "Update changelog v0.0.2",
|
||||||
|
"timestamp": "2020-05-12T02:57:00Z",
|
||||||
|
"tree_id": "b6ab3ee15210a0abf662d81364f93c172b7f0138",
|
||||||
|
"url": "https://github.com/garronej/super_waffle/commit/0e848524bf10b4896a939364d27afa2cd459a506"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"compare": "https://github.com/garronej/super_waffle/compare/6265951bf620...0e848524bf10",
|
||||||
|
"created": false,
|
||||||
|
"deleted": false,
|
||||||
|
"forced": false,
|
||||||
|
"head_commit": {
|
||||||
|
"author": {
|
||||||
|
"email": "denoify_ci@github.com",
|
||||||
|
"name": "denoify_ci"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"email": "denoify_ci@github.com",
|
||||||
|
"name": "denoify_ci"
|
||||||
|
},
|
||||||
|
"distinct": true,
|
||||||
|
"id": "0e848524bf10b4896a939364d27afa2cd459a506",
|
||||||
|
"message": "Update changelog v0.0.2",
|
||||||
|
"timestamp": "2020-05-12T02:57:00Z",
|
||||||
|
"tree_id": "b6ab3ee15210a0abf662d81364f93c172b7f0138",
|
||||||
|
"url": "https://github.com/garronej/super_waffle/commit/0e848524bf10b4896a939364d27afa2cd459a506"
|
||||||
|
},
|
||||||
|
"pusher": {
|
||||||
|
"email": "joseph.garrone@ensimag.grenoble-inp.fr",
|
||||||
|
"name": "garronej"
|
||||||
|
},
|
||||||
|
"ref": "refs/heads/dev",
|
||||||
|
"repository": {
|
||||||
|
"archive_url": "https://api.github.com/repos/garronej/super_waffle/{archive_format}{/ref}",
|
||||||
|
"archived": false,
|
||||||
|
"assignees_url": "https://api.github.com/repos/garronej/super_waffle/assignees{/user}",
|
||||||
|
"blobs_url": "https://api.github.com/repos/garronej/super_waffle/git/blobs{/sha}",
|
||||||
|
"branches_url": "https://api.github.com/repos/garronej/super_waffle/branches{/branch}",
|
||||||
|
"clone_url": "https://github.com/garronej/super_waffle.git",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/garronej/super_waffle/collaborators{/collaborator}",
|
||||||
|
"comments_url": "https://api.github.com/repos/garronej/super_waffle/comments{/number}",
|
||||||
|
"commits_url": "https://api.github.com/repos/garronej/super_waffle/commits{/sha}",
|
||||||
|
"compare_url": "https://api.github.com/repos/garronej/super_waffle/compare/{base}...{head}",
|
||||||
|
"contents_url": "https://api.github.com/repos/garronej/super_waffle/contents/{+path}",
|
||||||
|
"contributors_url": "https://api.github.com/repos/garronej/super_waffle/contributors",
|
||||||
|
"created_at": 1589246432,
|
||||||
|
"default_branch": "dev",
|
||||||
|
"deployments_url": "https://api.github.com/repos/garronej/super_waffle/deployments",
|
||||||
|
"description": "oh well",
|
||||||
|
"disabled": false,
|
||||||
|
"downloads_url": "https://api.github.com/repos/garronej/super_waffle/downloads",
|
||||||
|
"events_url": "https://api.github.com/repos/garronej/super_waffle/events",
|
||||||
|
"fork": false,
|
||||||
|
"forks": 0,
|
||||||
|
"forks_count": 0,
|
||||||
|
"forks_url": "https://api.github.com/repos/garronej/super_waffle/forks",
|
||||||
|
"full_name": "garronej/super_waffle",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/garronej/super_waffle/git/commits{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/garronej/super_waffle/git/refs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/garronej/super_waffle/git/tags{/sha}",
|
||||||
|
"git_url": "git://github.com/garronej/super_waffle.git",
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_issues": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"homepage": null,
|
||||||
|
"hooks_url": "https://api.github.com/repos/garronej/super_waffle/hooks",
|
||||||
|
"html_url": "https://github.com/garronej/super_waffle",
|
||||||
|
"id": 263199352,
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/garronej/super_waffle/issues/comments{/number}",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/garronej/super_waffle/issues/events{/number}",
|
||||||
|
"issues_url": "https://api.github.com/repos/garronej/super_waffle/issues{/number}",
|
||||||
|
"keys_url": "https://api.github.com/repos/garronej/super_waffle/keys{/key_id}",
|
||||||
|
"labels_url": "https://api.github.com/repos/garronej/super_waffle/labels{/name}",
|
||||||
|
"language": "TypeScript",
|
||||||
|
"languages_url": "https://api.github.com/repos/garronej/super_waffle/languages",
|
||||||
|
"license": null,
|
||||||
|
"master_branch": "dev",
|
||||||
|
"merges_url": "https://api.github.com/repos/garronej/super_waffle/merges",
|
||||||
|
"milestones_url": "https://api.github.com/repos/garronej/super_waffle/milestones{/number}",
|
||||||
|
"mirror_url": null,
|
||||||
|
"name": "super_waffle",
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkyNjMxOTkzNTI=",
|
||||||
|
"notifications_url": "https://api.github.com/repos/garronej/super_waffle/notifications{?since,all,participating}",
|
||||||
|
"open_issues": 0,
|
||||||
|
"open_issues_count": 0,
|
||||||
|
"owner": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"email": "joseph.garrone@ensimag.grenoble-inp.fr",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"name": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
},
|
||||||
|
"private": false,
|
||||||
|
"pulls_url": "https://api.github.com/repos/garronej/super_waffle/pulls{/number}",
|
||||||
|
"pushed_at": 1589252222,
|
||||||
|
"releases_url": "https://api.github.com/repos/garronej/super_waffle/releases{/id}",
|
||||||
|
"size": 13,
|
||||||
|
"ssh_url": "git@github.com:garronej/super_waffle.git",
|
||||||
|
"stargazers": 0,
|
||||||
|
"stargazers_count": 0,
|
||||||
|
"stargazers_url": "https://api.github.com/repos/garronej/super_waffle/stargazers",
|
||||||
|
"statuses_url": "https://api.github.com/repos/garronej/super_waffle/statuses/{sha}",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/garronej/super_waffle/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/garronej/super_waffle/subscription",
|
||||||
|
"svn_url": "https://github.com/garronej/super_waffle",
|
||||||
|
"tags_url": "https://api.github.com/repos/garronej/super_waffle/tags",
|
||||||
|
"teams_url": "https://api.github.com/repos/garronej/super_waffle/teams",
|
||||||
|
"trees_url": "https://api.github.com/repos/garronej/super_waffle/git/trees{/sha}",
|
||||||
|
"updated_at": "2020-05-12T02:36:00Z",
|
||||||
|
"url": "https://github.com/garronej/super_waffle",
|
||||||
|
"watchers": 0,
|
||||||
|
"watchers_count": 0
|
||||||
|
},
|
||||||
|
"sender": {
|
||||||
|
"avatar_url": "https://avatars0.githubusercontent.com/u/6702424?v=4",
|
||||||
|
"events_url": "https://api.github.com/users/garronej/events{/privacy}",
|
||||||
|
"followers_url": "https://api.github.com/users/garronej/followers",
|
||||||
|
"following_url": "https://api.github.com/users/garronej/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/garronej/gists{/gist_id}",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"html_url": "https://github.com/garronej",
|
||||||
|
"id": 6702424,
|
||||||
|
"login": "garronej",
|
||||||
|
"node_id": "MDQ6VXNlcjY3MDI0MjQ=",
|
||||||
|
"organizations_url": "https://api.github.com/users/garronej/orgs",
|
||||||
|
"received_events_url": "https://api.github.com/users/garronej/received_events",
|
||||||
|
"repos_url": "https://api.github.com/users/garronej/repos",
|
||||||
|
"site_admin": false,
|
||||||
|
"starred_url": "https://api.github.com/users/garronej/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/garronej/subscriptions",
|
||||||
|
"type": "User",
|
||||||
|
"url": "https://api.github.com/users/garronej"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"workspace": "/home/runner/work/super_waffle/super_waffle",
|
||||||
|
"action": "run1"
|
||||||
|
}
|
||||||
316
res/tmp.json
Normal file
316
res/tmp.json
Normal file
|
|
@ -0,0 +1,316 @@
|
||||||
|
{
|
||||||
|
"url": "https://api.github.com/repos/denoland/deno_website2/pulls/315",
|
||||||
|
"id": 401601041,
|
||||||
|
"node_id": "MDExOlB1bGxSZXF1ZXN0NDAxNjAxMDQx",
|
||||||
|
"html_url": "https://github.com/denoland/deno_website2/pull/315",
|
||||||
|
"diff_url": "https://github.com/denoland/deno_website2/pull/315.diff",
|
||||||
|
"patch_url": "https://github.com/denoland/deno_website2/pull/315.patch",
|
||||||
|
"issue_url": "https://api.github.com/repos/denoland/deno_website2/issues/315",
|
||||||
|
"number": 315,
|
||||||
|
"state": "open",
|
||||||
|
"locked": false,
|
||||||
|
"title": "Auto-focus Third Party Modules search field",
|
||||||
|
"user": {
|
||||||
|
"login": "chances",
|
||||||
|
"id": 635049,
|
||||||
|
"node_id": "MDQ6VXNlcjYzNTA0OQ==",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/635049?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/chances",
|
||||||
|
"html_url": "https://github.com/chances",
|
||||||
|
"followers_url": "https://api.github.com/users/chances/followers",
|
||||||
|
"following_url": "https://api.github.com/users/chances/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/chances/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/chances/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/chances/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/chances/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/chances/repos",
|
||||||
|
"events_url": "https://api.github.com/users/chances/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/chances/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"body": "Add the [`autoFocus`](https://material-ui.com/api/text-field/#props) attribute to the Third Party Modules search field for better ergonomics when navigating directly to [deno.land/x](https://deno.land/x).\r\n\r\nRelated to #176.",
|
||||||
|
"created_at": "2020-04-09T19:21:59Z",
|
||||||
|
"updated_at": "2020-04-09T20:15:45Z",
|
||||||
|
"closed_at": null,
|
||||||
|
"merged_at": null,
|
||||||
|
"merge_commit_sha": "321921f786a5788289b5346a4ee7d999a63b46ce",
|
||||||
|
"assignee": null,
|
||||||
|
"assignees": [],
|
||||||
|
"requested_reviewers": [],
|
||||||
|
"requested_teams": [],
|
||||||
|
"labels": [],
|
||||||
|
"milestone": null,
|
||||||
|
"draft": false,
|
||||||
|
"commits_url": "https://api.github.com/repos/denoland/deno_website2/pulls/315/commits",
|
||||||
|
"review_comments_url": "https://api.github.com/repos/denoland/deno_website2/pulls/315/comments",
|
||||||
|
"review_comment_url": "https://api.github.com/repos/denoland/deno_website2/pulls/comments{/number}",
|
||||||
|
"comments_url": "https://api.github.com/repos/denoland/deno_website2/issues/315/comments",
|
||||||
|
"statuses_url": "https://api.github.com/repos/denoland/deno_website2/statuses/841509e864f96e890fed282b436f156b79ccfe12",
|
||||||
|
"head": {
|
||||||
|
"label": "chances:autofocus-module-search",
|
||||||
|
"ref": "autofocus-module-search",
|
||||||
|
"sha": "841509e864f96e890fed282b436f156b79ccfe12",
|
||||||
|
"user": {
|
||||||
|
"login": "chances",
|
||||||
|
"id": 635049,
|
||||||
|
"node_id": "MDQ6VXNlcjYzNTA0OQ==",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/635049?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/chances",
|
||||||
|
"html_url": "https://github.com/chances",
|
||||||
|
"followers_url": "https://api.github.com/users/chances/followers",
|
||||||
|
"following_url": "https://api.github.com/users/chances/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/chances/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/chances/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/chances/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/chances/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/chances/repos",
|
||||||
|
"events_url": "https://api.github.com/users/chances/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/chances/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"id": 253940050,
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkyNTM5NDAwNTA=",
|
||||||
|
"name": "deno_website2",
|
||||||
|
"full_name": "chances/deno_website2",
|
||||||
|
"private": false,
|
||||||
|
"owner": {
|
||||||
|
"login": "chances",
|
||||||
|
"id": 635049,
|
||||||
|
"node_id": "MDQ6VXNlcjYzNTA0OQ==",
|
||||||
|
"avatar_url": "https://avatars2.githubusercontent.com/u/635049?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/chances",
|
||||||
|
"html_url": "https://github.com/chances",
|
||||||
|
"followers_url": "https://api.github.com/users/chances/followers",
|
||||||
|
"following_url": "https://api.github.com/users/chances/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/chances/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/chances/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/chances/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/chances/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/chances/repos",
|
||||||
|
"events_url": "https://api.github.com/users/chances/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/chances/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"html_url": "https://github.com/chances/deno_website2",
|
||||||
|
"description": "deno.land website ",
|
||||||
|
"fork": true,
|
||||||
|
"url": "https://api.github.com/repos/chances/deno_website2",
|
||||||
|
"forks_url": "https://api.github.com/repos/chances/deno_website2/forks",
|
||||||
|
"keys_url": "https://api.github.com/repos/chances/deno_website2/keys{/key_id}",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/chances/deno_website2/collaborators{/collaborator}",
|
||||||
|
"teams_url": "https://api.github.com/repos/chances/deno_website2/teams",
|
||||||
|
"hooks_url": "https://api.github.com/repos/chances/deno_website2/hooks",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/chances/deno_website2/issues/events{/number}",
|
||||||
|
"events_url": "https://api.github.com/repos/chances/deno_website2/events",
|
||||||
|
"assignees_url": "https://api.github.com/repos/chances/deno_website2/assignees{/user}",
|
||||||
|
"branches_url": "https://api.github.com/repos/chances/deno_website2/branches{/branch}",
|
||||||
|
"tags_url": "https://api.github.com/repos/chances/deno_website2/tags",
|
||||||
|
"blobs_url": "https://api.github.com/repos/chances/deno_website2/git/blobs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/chances/deno_website2/git/tags{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/chances/deno_website2/git/refs{/sha}",
|
||||||
|
"trees_url": "https://api.github.com/repos/chances/deno_website2/git/trees{/sha}",
|
||||||
|
"statuses_url": "https://api.github.com/repos/chances/deno_website2/statuses/{sha}",
|
||||||
|
"languages_url": "https://api.github.com/repos/chances/deno_website2/languages",
|
||||||
|
"stargazers_url": "https://api.github.com/repos/chances/deno_website2/stargazers",
|
||||||
|
"contributors_url": "https://api.github.com/repos/chances/deno_website2/contributors",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/chances/deno_website2/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/chances/deno_website2/subscription",
|
||||||
|
"commits_url": "https://api.github.com/repos/chances/deno_website2/commits{/sha}",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/chances/deno_website2/git/commits{/sha}",
|
||||||
|
"comments_url": "https://api.github.com/repos/chances/deno_website2/comments{/number}",
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/chances/deno_website2/issues/comments{/number}",
|
||||||
|
"contents_url": "https://api.github.com/repos/chances/deno_website2/contents/{+path}",
|
||||||
|
"compare_url": "https://api.github.com/repos/chances/deno_website2/compare/{base}...{head}",
|
||||||
|
"merges_url": "https://api.github.com/repos/chances/deno_website2/merges",
|
||||||
|
"archive_url": "https://api.github.com/repos/chances/deno_website2/{archive_format}{/ref}",
|
||||||
|
"downloads_url": "https://api.github.com/repos/chances/deno_website2/downloads",
|
||||||
|
"issues_url": "https://api.github.com/repos/chances/deno_website2/issues{/number}",
|
||||||
|
"pulls_url": "https://api.github.com/repos/chances/deno_website2/pulls{/number}",
|
||||||
|
"milestones_url": "https://api.github.com/repos/chances/deno_website2/milestones{/number}",
|
||||||
|
"notifications_url": "https://api.github.com/repos/chances/deno_website2/notifications{?since,all,participating}",
|
||||||
|
"labels_url": "https://api.github.com/repos/chances/deno_website2/labels{/name}",
|
||||||
|
"releases_url": "https://api.github.com/repos/chances/deno_website2/releases{/id}",
|
||||||
|
"deployments_url": "https://api.github.com/repos/chances/deno_website2/deployments",
|
||||||
|
"created_at": "2020-04-07T23:58:20Z",
|
||||||
|
"updated_at": "2020-04-07T23:58:22Z",
|
||||||
|
"pushed_at": "2020-04-09T19:52:19Z",
|
||||||
|
"git_url": "git://github.com/chances/deno_website2.git",
|
||||||
|
"ssh_url": "git@github.com:chances/deno_website2.git",
|
||||||
|
"clone_url": "https://github.com/chances/deno_website2.git",
|
||||||
|
"svn_url": "https://github.com/chances/deno_website2",
|
||||||
|
"homepage": "https://deno.land/",
|
||||||
|
"size": 1436,
|
||||||
|
"stargazers_count": 0,
|
||||||
|
"watchers_count": 0,
|
||||||
|
"language": null,
|
||||||
|
"has_issues": false,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_wiki": false,
|
||||||
|
"has_pages": false,
|
||||||
|
"forks_count": 0,
|
||||||
|
"mirror_url": null,
|
||||||
|
"archived": false,
|
||||||
|
"disabled": false,
|
||||||
|
"open_issues_count": 0,
|
||||||
|
"license": null,
|
||||||
|
"forks": 0,
|
||||||
|
"open_issues": 0,
|
||||||
|
"watchers": 0,
|
||||||
|
"default_branch": "master"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"label": "denoland:master",
|
||||||
|
"ref": "master",
|
||||||
|
"sha": "dd04ec78e2d1ae7d8b43eca1232e719574e9985a",
|
||||||
|
"user": {
|
||||||
|
"login": "denoland",
|
||||||
|
"id": 42048915,
|
||||||
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjQyMDQ4OTE1",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/42048915?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/denoland",
|
||||||
|
"html_url": "https://github.com/denoland",
|
||||||
|
"followers_url": "https://api.github.com/users/denoland/followers",
|
||||||
|
"following_url": "https://api.github.com/users/denoland/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/denoland/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/denoland/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/denoland/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/denoland/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/denoland/repos",
|
||||||
|
"events_url": "https://api.github.com/users/denoland/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/denoland/received_events",
|
||||||
|
"type": "Organization",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"repo": {
|
||||||
|
"id": 216156518,
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkyMTYxNTY1MTg=",
|
||||||
|
"name": "deno_website2",
|
||||||
|
"full_name": "denoland/deno_website2",
|
||||||
|
"private": false,
|
||||||
|
"owner": {
|
||||||
|
"login": "denoland",
|
||||||
|
"id": 42048915,
|
||||||
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjQyMDQ4OTE1",
|
||||||
|
"avatar_url": "https://avatars1.githubusercontent.com/u/42048915?v=4",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/denoland",
|
||||||
|
"html_url": "https://github.com/denoland",
|
||||||
|
"followers_url": "https://api.github.com/users/denoland/followers",
|
||||||
|
"following_url": "https://api.github.com/users/denoland/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/denoland/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/denoland/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/denoland/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/denoland/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/denoland/repos",
|
||||||
|
"events_url": "https://api.github.com/users/denoland/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/denoland/received_events",
|
||||||
|
"type": "Organization",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"html_url": "https://github.com/denoland/deno_website2",
|
||||||
|
"description": "deno.land website ",
|
||||||
|
"fork": false,
|
||||||
|
"url": "https://api.github.com/repos/denoland/deno_website2",
|
||||||
|
"forks_url": "https://api.github.com/repos/denoland/deno_website2/forks",
|
||||||
|
"keys_url": "https://api.github.com/repos/denoland/deno_website2/keys{/key_id}",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/denoland/deno_website2/collaborators{/collaborator}",
|
||||||
|
"teams_url": "https://api.github.com/repos/denoland/deno_website2/teams",
|
||||||
|
"hooks_url": "https://api.github.com/repos/denoland/deno_website2/hooks",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/denoland/deno_website2/issues/events{/number}",
|
||||||
|
"events_url": "https://api.github.com/repos/denoland/deno_website2/events",
|
||||||
|
"assignees_url": "https://api.github.com/repos/denoland/deno_website2/assignees{/user}",
|
||||||
|
"branches_url": "https://api.github.com/repos/denoland/deno_website2/branches{/branch}",
|
||||||
|
"tags_url": "https://api.github.com/repos/denoland/deno_website2/tags",
|
||||||
|
"blobs_url": "https://api.github.com/repos/denoland/deno_website2/git/blobs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/denoland/deno_website2/git/tags{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/denoland/deno_website2/git/refs{/sha}",
|
||||||
|
"trees_url": "https://api.github.com/repos/denoland/deno_website2/git/trees{/sha}",
|
||||||
|
"statuses_url": "https://api.github.com/repos/denoland/deno_website2/statuses/{sha}",
|
||||||
|
"languages_url": "https://api.github.com/repos/denoland/deno_website2/languages",
|
||||||
|
"stargazers_url": "https://api.github.com/repos/denoland/deno_website2/stargazers",
|
||||||
|
"contributors_url": "https://api.github.com/repos/denoland/deno_website2/contributors",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/denoland/deno_website2/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/denoland/deno_website2/subscription",
|
||||||
|
"commits_url": "https://api.github.com/repos/denoland/deno_website2/commits{/sha}",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/denoland/deno_website2/git/commits{/sha}",
|
||||||
|
"comments_url": "https://api.github.com/repos/denoland/deno_website2/comments{/number}",
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/denoland/deno_website2/issues/comments{/number}",
|
||||||
|
"contents_url": "https://api.github.com/repos/denoland/deno_website2/contents/{+path}",
|
||||||
|
"compare_url": "https://api.github.com/repos/denoland/deno_website2/compare/{base}...{head}",
|
||||||
|
"merges_url": "https://api.github.com/repos/denoland/deno_website2/merges",
|
||||||
|
"archive_url": "https://api.github.com/repos/denoland/deno_website2/{archive_format}{/ref}",
|
||||||
|
"downloads_url": "https://api.github.com/repos/denoland/deno_website2/downloads",
|
||||||
|
"issues_url": "https://api.github.com/repos/denoland/deno_website2/issues{/number}",
|
||||||
|
"pulls_url": "https://api.github.com/repos/denoland/deno_website2/pulls{/number}",
|
||||||
|
"milestones_url": "https://api.github.com/repos/denoland/deno_website2/milestones{/number}",
|
||||||
|
"notifications_url": "https://api.github.com/repos/denoland/deno_website2/notifications{?since,all,participating}",
|
||||||
|
"labels_url": "https://api.github.com/repos/denoland/deno_website2/labels{/name}",
|
||||||
|
"releases_url": "https://api.github.com/repos/denoland/deno_website2/releases{/id}",
|
||||||
|
"deployments_url": "https://api.github.com/repos/denoland/deno_website2/deployments",
|
||||||
|
"created_at": "2019-10-19T05:53:43Z",
|
||||||
|
"updated_at": "2020-05-12T22:28:15Z",
|
||||||
|
"pushed_at": "2020-05-12T22:35:23Z",
|
||||||
|
"git_url": "git://github.com/denoland/deno_website2.git",
|
||||||
|
"ssh_url": "git@github.com:denoland/deno_website2.git",
|
||||||
|
"clone_url": "https://github.com/denoland/deno_website2.git",
|
||||||
|
"svn_url": "https://github.com/denoland/deno_website2",
|
||||||
|
"homepage": "https://deno.land/",
|
||||||
|
"size": 1517,
|
||||||
|
"stargazers_count": 187,
|
||||||
|
"watchers_count": 187,
|
||||||
|
"language": "TypeScript",
|
||||||
|
"has_issues": true,
|
||||||
|
"has_projects": false,
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_wiki": false,
|
||||||
|
"has_pages": false,
|
||||||
|
"forks_count": 131,
|
||||||
|
"mirror_url": null,
|
||||||
|
"archived": false,
|
||||||
|
"disabled": false,
|
||||||
|
"open_issues_count": 32,
|
||||||
|
"license": null,
|
||||||
|
"forks": 131,
|
||||||
|
"open_issues": 32,
|
||||||
|
"watchers": 187,
|
||||||
|
"default_branch": "master"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"_links": {
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/315"
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"href": "https://github.com/denoland/deno_website2/pull/315"
|
||||||
|
},
|
||||||
|
"issue": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/issues/315"
|
||||||
|
},
|
||||||
|
"comments": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/issues/315/comments"
|
||||||
|
},
|
||||||
|
"review_comments": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/315/comments"
|
||||||
|
},
|
||||||
|
"review_comment": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/comments{/number}"
|
||||||
|
},
|
||||||
|
"commits": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/pulls/315/commits"
|
||||||
|
},
|
||||||
|
"statuses": {
|
||||||
|
"href": "https://api.github.com/repos/denoland/deno_website2/statuses/841509e864f96e890fed282b436f156b79ccfe12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"author_association": "CONTRIBUTOR"
|
||||||
|
}
|
||||||
|
|
@ -1,150 +0,0 @@
|
||||||
import { execSync } from "child_process";
|
|
||||||
import { join as pathJoin, relative as pathRelative } from "path";
|
|
||||||
import * as fs from "fs";
|
|
||||||
import * as os from "os";
|
|
||||||
|
|
||||||
const singletonDependencies: string[] = ["react", "@types/react"];
|
|
||||||
|
|
||||||
// For example [ "@emotion" ] it's more convenient than
|
|
||||||
// having to list every sub emotion packages (@emotion/css @emotion/utils ...)
|
|
||||||
// in singletonDependencies
|
|
||||||
const namespaceSingletonDependencies: string[] = [];
|
|
||||||
|
|
||||||
const rootDirPath = pathJoin(__dirname, "..");
|
|
||||||
|
|
||||||
//NOTE: This is only required because of: https://github.com/garronej/ts-ci/blob/c0e207b9677523d4ec97fe672ddd72ccbb3c1cc4/README.md?plain=1#L54-L58
|
|
||||||
//If you change the outDir in tsconfig.json you must update this block.
|
|
||||||
{
|
|
||||||
let modifiedPackageJsonContent = fs
|
|
||||||
.readFileSync(pathJoin(rootDirPath, "package.json"))
|
|
||||||
.toString("utf8");
|
|
||||||
|
|
||||||
modifiedPackageJsonContent = (() => {
|
|
||||||
const o = JSON.parse(modifiedPackageJsonContent);
|
|
||||||
|
|
||||||
delete o.files;
|
|
||||||
|
|
||||||
return JSON.stringify(o, null, 2);
|
|
||||||
})();
|
|
||||||
|
|
||||||
modifiedPackageJsonContent = modifiedPackageJsonContent
|
|
||||||
.replace(/"dist\//g, '"')
|
|
||||||
.replace(/"\.\/dist\//g, '"./')
|
|
||||||
.replace(/"!dist\//g, '"!')
|
|
||||||
.replace(/"!\.\/dist\//g, '"!./');
|
|
||||||
|
|
||||||
fs.writeFileSync(
|
|
||||||
pathJoin(rootDirPath, "dist", "package.json"),
|
|
||||||
Buffer.from(modifiedPackageJsonContent, "utf8")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const commonThirdPartyDeps = [
|
|
||||||
...namespaceSingletonDependencies
|
|
||||||
.map(namespaceModuleName =>
|
|
||||||
fs
|
|
||||||
.readdirSync(pathJoin(rootDirPath, "node_modules", namespaceModuleName))
|
|
||||||
.map(submoduleName => `${namespaceModuleName}/${submoduleName}`)
|
|
||||||
)
|
|
||||||
.reduce((prev, curr) => [...prev, ...curr], []),
|
|
||||||
...singletonDependencies
|
|
||||||
];
|
|
||||||
|
|
||||||
const yarnGlobalDirPath = pathJoin(rootDirPath, ".yarn_home");
|
|
||||||
|
|
||||||
fs.rmSync(yarnGlobalDirPath, { "recursive": true, "force": true });
|
|
||||||
fs.mkdirSync(yarnGlobalDirPath);
|
|
||||||
|
|
||||||
const execYarnLink = (params: { targetModuleName?: string; cwd: string }) => {
|
|
||||||
const { targetModuleName, cwd } = params;
|
|
||||||
|
|
||||||
const cmd = [
|
|
||||||
"yarn",
|
|
||||||
"link",
|
|
||||||
...(targetModuleName !== undefined ? [targetModuleName] : ["--no-bin-links"])
|
|
||||||
].join(" ");
|
|
||||||
|
|
||||||
console.log(`$ cd ${pathRelative(rootDirPath, cwd) || "."} && ${cmd}`);
|
|
||||||
|
|
||||||
execSync(cmd, {
|
|
||||||
cwd,
|
|
||||||
env: {
|
|
||||||
...process.env,
|
|
||||||
...(os.platform() === "win32"
|
|
||||||
? { USERPROFILE: yarnGlobalDirPath }
|
|
||||||
: { HOME: yarnGlobalDirPath })
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const testAppPaths = (() => {
|
|
||||||
const [, , ...testAppNames] = process.argv;
|
|
||||||
|
|
||||||
return testAppNames
|
|
||||||
.map(testAppName => {
|
|
||||||
const testAppPath = pathJoin(rootDirPath, "..", testAppName);
|
|
||||||
|
|
||||||
if (fs.existsSync(testAppPath)) {
|
|
||||||
return testAppPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.warn(`Skipping ${testAppName} since it cant be found here: ${testAppPath}`);
|
|
||||||
|
|
||||||
return undefined;
|
|
||||||
})
|
|
||||||
.filter((path): path is string => path !== undefined);
|
|
||||||
})();
|
|
||||||
|
|
||||||
if (testAppPaths.length === 0) {
|
|
||||||
console.error("No test app to link into!");
|
|
||||||
process.exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
testAppPaths.forEach(testAppPath => execSync("yarn install", { "cwd": testAppPath }));
|
|
||||||
|
|
||||||
console.log("=== Linking common dependencies ===");
|
|
||||||
|
|
||||||
const total = commonThirdPartyDeps.length;
|
|
||||||
let current = 0;
|
|
||||||
|
|
||||||
commonThirdPartyDeps.forEach(commonThirdPartyDep => {
|
|
||||||
current++;
|
|
||||||
|
|
||||||
console.log(`${current}/${total} ${commonThirdPartyDep}`);
|
|
||||||
|
|
||||||
const localInstallPath = pathJoin(
|
|
||||||
...[
|
|
||||||
rootDirPath,
|
|
||||||
"node_modules",
|
|
||||||
...(commonThirdPartyDep.startsWith("@")
|
|
||||||
? commonThirdPartyDep.split("/")
|
|
||||||
: [commonThirdPartyDep])
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
execYarnLink({ "cwd": localInstallPath });
|
|
||||||
});
|
|
||||||
|
|
||||||
commonThirdPartyDeps.forEach(commonThirdPartyDep =>
|
|
||||||
testAppPaths.forEach(testAppPath =>
|
|
||||||
execYarnLink({
|
|
||||||
"cwd": testAppPath,
|
|
||||||
"targetModuleName": commonThirdPartyDep
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
console.log("=== Linking in house dependencies ===");
|
|
||||||
|
|
||||||
execYarnLink({ "cwd": pathJoin(rootDirPath, "dist") });
|
|
||||||
|
|
||||||
testAppPaths.forEach(testAppPath =>
|
|
||||||
execYarnLink({
|
|
||||||
"cwd": testAppPath,
|
|
||||||
"targetModuleName": JSON.parse(
|
|
||||||
fs.readFileSync(pathJoin(rootDirPath, "package.json")).toString("utf8")
|
|
||||||
)["name"]
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
export {};
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
export function MyReactComponent() {
|
|
||||||
return <div>My React Component</div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default MyReactComponent;
|
|
||||||
33
src/bin/generateActionYml.ts
Normal file
33
src/bin/generateActionYml.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
|
||||||
|
import * as fs from "fs";
|
||||||
|
import * as path from "path";
|
||||||
|
import { inputNames, getInputDescription, getInputDefault } from "../inputHelper";
|
||||||
|
import { outputNames, getOutputDescription } from "../outputHelper";
|
||||||
|
|
||||||
|
const projectRoot = path.join(__dirname, "..", "..");
|
||||||
|
|
||||||
|
const packageJsonParsed = require(path.join(projectRoot, "package.json"));
|
||||||
|
|
||||||
|
fs.writeFileSync(
|
||||||
|
path.join(projectRoot, "action.yml"),
|
||||||
|
Buffer.from([
|
||||||
|
`name: '${packageJsonParsed["name"]}'`,
|
||||||
|
`description: '${packageJsonParsed["description"]}'`,
|
||||||
|
`author: '${packageJsonParsed["author"]}'`,
|
||||||
|
`inputs:`,
|
||||||
|
...inputNames.map((inputName, i) => [
|
||||||
|
` ${inputName}:`,
|
||||||
|
` required: ${i === 0 ? "true" : "false"}`,
|
||||||
|
` description: '${getInputDescription(inputName).replace(/'/g,"''")}'`,
|
||||||
|
...[getInputDefault(inputName)].filter(x=>x!==undefined).map(s=>` default: '${s}'`)
|
||||||
|
].join("\n")),
|
||||||
|
`outputs:`,
|
||||||
|
...outputNames.map((outputName, i) => [
|
||||||
|
` ${outputName}:`,
|
||||||
|
` description: '${getOutputDescription(outputName).replace(/'/g,"''")}'`
|
||||||
|
].join("\n")),
|
||||||
|
`runs:`,
|
||||||
|
` using: 'node12'`,
|
||||||
|
` main: 'dist/index.js'`
|
||||||
|
].join("\n"), "utf8")
|
||||||
|
);
|
||||||
47
src/dispatch_event.ts
Normal file
47
src/dispatch_event.ts
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
import { getActionParamsFactory } from "./inputHelper";
|
||||||
|
import { createOctokit } from "./tools/createOctokit";
|
||||||
|
|
||||||
|
export const { getActionParams } = getActionParamsFactory({
|
||||||
|
"inputNameSubset": [
|
||||||
|
"owner",
|
||||||
|
"repo",
|
||||||
|
"event_type",
|
||||||
|
"client_payload_json",
|
||||||
|
"github_token"
|
||||||
|
] as const
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Params = ReturnType<typeof getActionParams>;
|
||||||
|
|
||||||
|
|
||||||
|
type CoreLike = {
|
||||||
|
debug: (message: string) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function action(
|
||||||
|
_actionName: "dispatch_event",
|
||||||
|
params: Params,
|
||||||
|
core: CoreLike
|
||||||
|
) {
|
||||||
|
|
||||||
|
const { owner, repo, event_type, client_payload_json, github_token } = params;
|
||||||
|
|
||||||
|
core.debug(JSON.stringify({ _actionName, params }));
|
||||||
|
|
||||||
|
|
||||||
|
const octokit = createOctokit({ github_token });
|
||||||
|
|
||||||
|
await octokit.repos.createDispatchEvent({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
event_type,
|
||||||
|
|
||||||
|
...(!!client_payload_json ?
|
||||||
|
{ "client_payload": JSON.parse(client_payload_json) } :
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
61
src/get_package_json_version.ts
Normal file
61
src/get_package_json_version.ts
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
|
||||||
|
import fetch from "node-fetch";
|
||||||
|
const urlJoin: typeof import("path").join = require("url-join");
|
||||||
|
import { setOutputFactory } from "./outputHelper";
|
||||||
|
import { NpmModuleVersion } from "./tools/NpmModuleVersion";
|
||||||
|
|
||||||
|
import { getActionParamsFactory } from "./inputHelper";
|
||||||
|
|
||||||
|
export const { getActionParams } = getActionParamsFactory({
|
||||||
|
"inputNameSubset": [
|
||||||
|
"owner",
|
||||||
|
"repo",
|
||||||
|
"branch",
|
||||||
|
"compare_to_version"
|
||||||
|
] as const
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Params = ReturnType<typeof getActionParams>;
|
||||||
|
|
||||||
|
type CoreLike = {
|
||||||
|
debug: (message: string) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const { setOutput } = setOutputFactory<"version" | "compare_result">();
|
||||||
|
|
||||||
|
export async function action(
|
||||||
|
_actionName: "get_package_json_version",
|
||||||
|
params: Params,
|
||||||
|
core: CoreLike
|
||||||
|
): Promise<Parameters<typeof setOutput>[0]> {
|
||||||
|
|
||||||
|
core.debug(JSON.stringify(params));
|
||||||
|
|
||||||
|
const { owner, repo, branch, compare_to_version } = params;
|
||||||
|
|
||||||
|
const version = await fetch(
|
||||||
|
urlJoin(
|
||||||
|
"https://raw.github.com",
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
branch,
|
||||||
|
"package.json"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.then(res => res.text())
|
||||||
|
.then(text => JSON.parse(text))
|
||||||
|
.then(({ version }) => version as string)
|
||||||
|
.catch(() => "")
|
||||||
|
;
|
||||||
|
|
||||||
|
core.debug(`Version on ${owner}/${repo}#${branch} is ${version}`);
|
||||||
|
|
||||||
|
return {
|
||||||
|
version,
|
||||||
|
"compare_result": NpmModuleVersion.compare(
|
||||||
|
NpmModuleVersion.parse(version || "0.0.0"),
|
||||||
|
NpmModuleVersion.parse(compare_to_version)
|
||||||
|
).toString()
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
export * from "./myFunction";
|
|
||||||
export * from "./myObject";
|
|
||||||
export * from "./MyReactComponent";
|
|
||||||
129
src/inputHelper.ts
Normal file
129
src/inputHelper.ts
Normal file
|
|
@ -0,0 +1,129 @@
|
||||||
|
|
||||||
|
import * as core from '@actions/core';
|
||||||
|
|
||||||
|
export const inputNames = [
|
||||||
|
"action_name",
|
||||||
|
"owner",
|
||||||
|
"repo",
|
||||||
|
"event_type",
|
||||||
|
"client_payload_json",
|
||||||
|
"branch",
|
||||||
|
"exclude_commit_from_author_names_json",
|
||||||
|
"module_name",
|
||||||
|
"compare_to_version",
|
||||||
|
"input_string",
|
||||||
|
"search_value",
|
||||||
|
"replace_value",
|
||||||
|
"should_webhook_be_enabled",
|
||||||
|
"github_token"
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
export const availableActions = [
|
||||||
|
"get_package_json_version",
|
||||||
|
"dispatch_event",
|
||||||
|
"update_changelog",
|
||||||
|
"sync_package_and_package_lock_version",
|
||||||
|
"setup_repo_webhook_for_deno_land_publishing",
|
||||||
|
"is_well_formed_and_available_module_name",
|
||||||
|
"string_replace",
|
||||||
|
"tell_if_project_uses_npm_or_yarn",
|
||||||
|
"is_package_json_version_upgraded"
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
|
||||||
|
export function getInputDescription(inputName: typeof inputNames[number]): string {
|
||||||
|
switch(inputName){
|
||||||
|
case "action_name": return [
|
||||||
|
`Action to run, one of: `,
|
||||||
|
availableActions.map(s=>`"${s}"`).join(", ")
|
||||||
|
].join("");
|
||||||
|
case "owner": return [
|
||||||
|
"Repository owner, example: 'garronej',",
|
||||||
|
"github.repository_owner"
|
||||||
|
].join("");
|
||||||
|
case "repo": return [
|
||||||
|
"Repository name, example: ",
|
||||||
|
"'evt', github.event.repository.name"
|
||||||
|
].join("");
|
||||||
|
case "event_type": return [
|
||||||
|
"see: https://developer.github.com/v3/",
|
||||||
|
"repos/#create-a-repository-dispatch-event"
|
||||||
|
].join("");
|
||||||
|
case "client_payload_json": return [
|
||||||
|
"Example '{\"p\":\"foo\"}' see: https://developer.github.com/v3/",
|
||||||
|
"repos/#create-a-repository-dispatch-event"
|
||||||
|
].join("");
|
||||||
|
case "branch": return "Example: default ( can also be a sha )";
|
||||||
|
case "exclude_commit_from_author_names_json": return [
|
||||||
|
"For update_changelog, do not includes commit from user ",
|
||||||
|
`certain committer in the CHANGELOG.md, ex: '["denoify_ci"]'`
|
||||||
|
].join("");
|
||||||
|
case "module_name": return [
|
||||||
|
`A candidate module name, Example: lodash`
|
||||||
|
].join("");
|
||||||
|
case "compare_to_version": return [
|
||||||
|
`For get_package_json_version, a version against which comparing the result`,
|
||||||
|
`if found version more recent than compare_to_version compare_result is 1`,
|
||||||
|
`if found version is equal to compare_to_version compare_result is 0`,
|
||||||
|
`if found version is older to compare_to_version compare_result -1`,
|
||||||
|
`Example: 0.1.3`
|
||||||
|
].join(" ");
|
||||||
|
case "input_string": return `For string_replace, the string to replace`;
|
||||||
|
case "search_value": return `For string_replace, Example '-' ( Will be used as arg for RegExp constructor )`;
|
||||||
|
case "replace_value": return `For string_replace, Example '_'`;
|
||||||
|
case "should_webhook_be_enabled": return `true|false, Should the create webhook be enabled, with setup_repo_webhook_for_deno_land_publishing`;
|
||||||
|
case "github_token": return "GitHub Personal access token";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function getInputDefault(inputName: typeof inputNames[number]): string | undefined {
|
||||||
|
|
||||||
|
switch(inputName){
|
||||||
|
case "owner": return "${{github.repository_owner}}";
|
||||||
|
case "repo": return "${{github.event.repository.name}}";
|
||||||
|
case "branch": return "${{ github.sha }}";
|
||||||
|
case "github_token": return "${{ github.token }}";
|
||||||
|
case "exclude_commit_from_author_names_json": return '["actions"]';
|
||||||
|
case "should_webhook_be_enabled": return "true";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const getInput = (inputName: typeof inputNames[number]) => {
|
||||||
|
|
||||||
|
if (inputNames.indexOf(inputName) < 0) {
|
||||||
|
throw new Error(`${inputName} expected`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return core.getInput(inputName);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function getActionParamsFactory<U extends typeof inputNames[number]>(
|
||||||
|
params: {
|
||||||
|
inputNameSubset: readonly U[]
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
|
||||||
|
const { inputNameSubset } = params;
|
||||||
|
|
||||||
|
function getActionParams() {
|
||||||
|
|
||||||
|
const params: Record<U, string> = {} as any;
|
||||||
|
|
||||||
|
inputNameSubset.forEach(inputName => params[inputName] = getInput(inputName));
|
||||||
|
|
||||||
|
return params;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
return { getActionParams };
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getActionName(): typeof availableActions[number] {
|
||||||
|
return getInput("action_name") as any;
|
||||||
|
}
|
||||||
110
src/is_package_json_version_upgraded.ts
Normal file
110
src/is_package_json_version_upgraded.ts
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
|
||||||
|
import fetch from "node-fetch";
|
||||||
|
const urlJoin: typeof import("path").join = require("url-join");
|
||||||
|
import { setOutputFactory } from "./outputHelper";
|
||||||
|
import { NpmModuleVersion } from "./tools/NpmModuleVersion";
|
||||||
|
import { getActionParamsFactory } from "./inputHelper";
|
||||||
|
import { createOctokit } from "./tools/createOctokit";
|
||||||
|
import { getLatestSemVersionedTagFactory } from "./tools/octokit-addons/getLatestSemVersionedTag";
|
||||||
|
|
||||||
|
export const { getActionParams } = getActionParamsFactory({
|
||||||
|
"inputNameSubset": [
|
||||||
|
"owner",
|
||||||
|
"repo",
|
||||||
|
"branch",
|
||||||
|
"github_token"
|
||||||
|
] as const
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Params = ReturnType<typeof getActionParams>;
|
||||||
|
|
||||||
|
type CoreLike = {
|
||||||
|
debug: (message: string) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const { setOutput } = setOutputFactory<"from_version" | "to_version" | "is_upgraded_version" | "is_release_beta">();
|
||||||
|
|
||||||
|
export async function action(
|
||||||
|
_actionName: "is_package_json_version_upgraded",
|
||||||
|
params: Params,
|
||||||
|
core: CoreLike
|
||||||
|
): Promise<Parameters<typeof setOutput>[0]> {
|
||||||
|
|
||||||
|
core.debug(JSON.stringify(params));
|
||||||
|
|
||||||
|
const { owner, repo, github_token } = params;
|
||||||
|
|
||||||
|
//params.branch <- github.head_ref || github.ref
|
||||||
|
//When it's a normal branch: github.head_ref==="" and github.ref==="refs/heads/main"
|
||||||
|
//When it's a pr from: github.head_ref==="<name of the branch branch>"
|
||||||
|
const branch = params.branch.replace(/^refs\/heads\//, "");
|
||||||
|
|
||||||
|
const to_version = await getPackageJsonVersion({ owner, repo, branch });
|
||||||
|
|
||||||
|
if( to_version === undefined ){
|
||||||
|
throw new Error(`No version in package.json on ${owner}/${repo}#${branch} (or repo is private)`);
|
||||||
|
}
|
||||||
|
|
||||||
|
core.debug(`Version on ${owner}/${repo}#${branch} is ${NpmModuleVersion.stringify(to_version)}`);
|
||||||
|
|
||||||
|
const octokit = createOctokit({ github_token });
|
||||||
|
|
||||||
|
const { getLatestSemVersionedTag } = getLatestSemVersionedTagFactory({ octokit });
|
||||||
|
|
||||||
|
const { version: from_version } = await getLatestSemVersionedTag({ owner, repo, "doIgnoreBeta": false })
|
||||||
|
.then(wrap => wrap === undefined ? { "version": NpmModuleVersion.parse("0.0.0") } : wrap);
|
||||||
|
|
||||||
|
core.debug(`Last version was ${NpmModuleVersion.stringify(from_version)}`);
|
||||||
|
|
||||||
|
const is_upgraded_version = NpmModuleVersion.compare(
|
||||||
|
to_version,
|
||||||
|
from_version
|
||||||
|
) === 1 ? "true" : "false";
|
||||||
|
|
||||||
|
core.debug(`Is version upgraded: ${is_upgraded_version}`);
|
||||||
|
|
||||||
|
const is_release_beta= is_upgraded_version === "false" ? "false" : to_version.betaPreRelease !== undefined ? "true" : "false";
|
||||||
|
|
||||||
|
core.debug(`Is release beta: ${is_release_beta}`);
|
||||||
|
|
||||||
|
return {
|
||||||
|
"to_version": NpmModuleVersion.stringify(to_version),
|
||||||
|
"from_version": NpmModuleVersion.stringify(from_version),
|
||||||
|
is_upgraded_version,
|
||||||
|
is_release_beta
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO: Find a way to make it work with private repo
|
||||||
|
async function getPackageJsonVersion(params: {
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
branch: string;
|
||||||
|
}): Promise<NpmModuleVersion | undefined> {
|
||||||
|
|
||||||
|
const { owner, repo, branch } = params;
|
||||||
|
|
||||||
|
const version = await fetch(
|
||||||
|
urlJoin(
|
||||||
|
`https://raw.github.com`,
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
branch,
|
||||||
|
"package.json"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.then(res => res.text())
|
||||||
|
.then(text => JSON.parse(text))
|
||||||
|
.then(({ version }) => version as string)
|
||||||
|
.catch(()=> undefined)
|
||||||
|
;
|
||||||
|
|
||||||
|
if( version === undefined){
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NpmModuleVersion.parse(version);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
58
src/is_well_formed_and_available_module_name.ts
Normal file
58
src/is_well_formed_and_available_module_name.ts
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
|
||||||
|
|
||||||
|
import { setOutputFactory } from "./outputHelper";
|
||||||
|
import { getActionParamsFactory } from "./inputHelper";
|
||||||
|
import { is404 } from "./tools/is404";
|
||||||
|
|
||||||
|
import validate_npm_package_name from "validate-npm-package-name";
|
||||||
|
|
||||||
|
|
||||||
|
export const { getActionParams } = getActionParamsFactory({
|
||||||
|
"inputNameSubset": [
|
||||||
|
"module_name"
|
||||||
|
] as const
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Params = ReturnType<typeof getActionParams>;
|
||||||
|
|
||||||
|
type CoreLike = {
|
||||||
|
debug: (message: string) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const { setOutput } = setOutputFactory<
|
||||||
|
"is_valid_node_module_name" |
|
||||||
|
"is_valid_deno_module_name" |
|
||||||
|
"is_available_on_npm" |
|
||||||
|
"is_available_on_deno_land"
|
||||||
|
>();
|
||||||
|
|
||||||
|
export async function action(
|
||||||
|
_actionName: "is_well_formed_and_available_module_name",
|
||||||
|
params: Params,
|
||||||
|
core: CoreLike
|
||||||
|
): Promise<Parameters<typeof setOutput>[0]> {
|
||||||
|
|
||||||
|
const { module_name } = params;
|
||||||
|
|
||||||
|
const { validForNewPackages } = validate_npm_package_name(module_name);
|
||||||
|
|
||||||
|
const validForDenoPackages = validForNewPackages && module_name.indexOf("-") < 0
|
||||||
|
|
||||||
|
return {
|
||||||
|
"is_valid_node_module_name": validForNewPackages ? "true" : "false",
|
||||||
|
"is_available_on_npm":
|
||||||
|
!validForNewPackages ?
|
||||||
|
"false"
|
||||||
|
:
|
||||||
|
(await is404(`https://www.npmjs.com/package/${module_name}`)) ?
|
||||||
|
"true" : "false",
|
||||||
|
"is_valid_deno_module_name": validForDenoPackages ? "true" : "false",
|
||||||
|
"is_available_on_deno_land":
|
||||||
|
!validForDenoPackages ?
|
||||||
|
"false"
|
||||||
|
:
|
||||||
|
(await is404(`https://deno.land/x/${module_name}/`)) ?
|
||||||
|
"true" : "false"
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
113
src/main.ts
Normal file
113
src/main.ts
Normal file
|
|
@ -0,0 +1,113 @@
|
||||||
|
import * as core from '@actions/core'
|
||||||
|
import * as get_package_json_version from "./get_package_json_version";
|
||||||
|
import * as dispatch_event from "./dispatch_event";
|
||||||
|
import * as sync_package_and_package_lock_version from "./sync_package_and_package_lock_version";
|
||||||
|
import * as setup_repo_webhook_for_deno_land_publishing from "./setup_repo_webhook_for_deno_land_publishing";
|
||||||
|
import * as is_well_formed_and_available_module_name from "./is_well_formed_and_available_module_name";
|
||||||
|
import * as tell_if_project_uses_npm_or_yarn from "./tell_if_project_uses_npm_or_yarn";
|
||||||
|
import * as string_replace from "./string_replace";
|
||||||
|
import * as is_package_json_version_upgraded from "./is_package_json_version_upgraded";
|
||||||
|
import { getActionName } from "./inputHelper";
|
||||||
|
import * as update_changelog from "./update_changelog";
|
||||||
|
|
||||||
|
async function run(): Promise<null> {
|
||||||
|
|
||||||
|
const action_name = getActionName();
|
||||||
|
|
||||||
|
switch (action_name) {
|
||||||
|
case "get_package_json_version":
|
||||||
|
get_package_json_version.setOutput(
|
||||||
|
await get_package_json_version.action(
|
||||||
|
action_name,
|
||||||
|
get_package_json_version.getActionParams(),
|
||||||
|
core
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
case "dispatch_event":
|
||||||
|
await dispatch_event.action(
|
||||||
|
action_name,
|
||||||
|
dispatch_event.getActionParams(),
|
||||||
|
core
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
case "update_changelog":
|
||||||
|
await update_changelog.action(
|
||||||
|
action_name,
|
||||||
|
update_changelog.getActionParams(),
|
||||||
|
core
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
case "sync_package_and_package_lock_version":
|
||||||
|
await sync_package_and_package_lock_version.action(
|
||||||
|
action_name,
|
||||||
|
sync_package_and_package_lock_version.getActionParams(),
|
||||||
|
core
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
case "setup_repo_webhook_for_deno_land_publishing":
|
||||||
|
setup_repo_webhook_for_deno_land_publishing.setOutput(
|
||||||
|
await setup_repo_webhook_for_deno_land_publishing.action(
|
||||||
|
action_name,
|
||||||
|
setup_repo_webhook_for_deno_land_publishing.getActionParams(),
|
||||||
|
core
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
case "is_well_formed_and_available_module_name":
|
||||||
|
is_well_formed_and_available_module_name.setOutput(
|
||||||
|
await is_well_formed_and_available_module_name.action(
|
||||||
|
action_name,
|
||||||
|
is_well_formed_and_available_module_name.getActionParams(),
|
||||||
|
core
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
case "string_replace":
|
||||||
|
string_replace.setOutput(
|
||||||
|
await string_replace.action(
|
||||||
|
action_name,
|
||||||
|
string_replace.getActionParams(),
|
||||||
|
core
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
case "tell_if_project_uses_npm_or_yarn":
|
||||||
|
tell_if_project_uses_npm_or_yarn.setOutput(
|
||||||
|
await tell_if_project_uses_npm_or_yarn.action(
|
||||||
|
action_name,
|
||||||
|
tell_if_project_uses_npm_or_yarn.getActionParams(),
|
||||||
|
core
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
case "is_package_json_version_upgraded":
|
||||||
|
is_package_json_version_upgraded.setOutput(
|
||||||
|
await is_package_json_version_upgraded.action(
|
||||||
|
action_name,
|
||||||
|
is_package_json_version_upgraded.getActionParams(),
|
||||||
|
core
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (1 === 0 + 1) {
|
||||||
|
throw new Error(`${action_name} Not supported by this toolkit`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
await run()
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
core.setFailed(error.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
export function myFunction() {
|
|
||||||
return ["a", "b", "c"];
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export const myObject = { "p": "foo" };
|
|
||||||
53
src/outputHelper.ts
Normal file
53
src/outputHelper.ts
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
|
||||||
|
import * as core from '@actions/core'
|
||||||
|
import { objectKeys } from "evt/dist/tools/typeSafety/objectKeys";
|
||||||
|
|
||||||
|
export const outputNames = [
|
||||||
|
"version",
|
||||||
|
"is_valid_node_module_name",
|
||||||
|
"is_valid_deno_module_name",
|
||||||
|
"is_available_on_npm",
|
||||||
|
"is_available_on_deno_land",
|
||||||
|
"was_already_published",
|
||||||
|
"compare_result",
|
||||||
|
"replace_result",
|
||||||
|
"was_hook_created",
|
||||||
|
"npm_or_yarn",
|
||||||
|
"from_version",
|
||||||
|
"to_version",
|
||||||
|
"is_upgraded_version",
|
||||||
|
"is_release_beta"
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
|
||||||
|
export function getOutputDescription(inputName: typeof outputNames[number]): string {
|
||||||
|
switch (inputName) {
|
||||||
|
case "version": return "Output of get_package_json_version";
|
||||||
|
case "is_valid_node_module_name": return "true|false";
|
||||||
|
case "is_valid_deno_module_name": return "true|false";
|
||||||
|
case "is_available_on_npm": return "true|false";
|
||||||
|
case "is_available_on_deno_land": return "true|false";
|
||||||
|
case "was_already_published": return "true|false";
|
||||||
|
case "compare_result": return "1|0|-1";
|
||||||
|
case "replace_result": return "Output of string_replace";
|
||||||
|
case "was_hook_created": return "true|false";
|
||||||
|
case "npm_or_yarn": return "npm|yarn";
|
||||||
|
case "from_version": return "Output of is_package_json_version_upgraded, string";
|
||||||
|
case "to_version": return "Output of is_package_json_version_upgraded, string";
|
||||||
|
case "is_upgraded_version": return "Output of is_package_json_version_upgraded, true|false";
|
||||||
|
case "is_release_beta": return "Output of is_package_json_version_upgraded, true|false";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setOutputFactory<U extends typeof outputNames[number]>() {
|
||||||
|
|
||||||
|
function setOutput(outputs: Record<U, string>): void {
|
||||||
|
|
||||||
|
objectKeys(outputs)
|
||||||
|
.forEach(outputName => core.setOutput(outputName, outputs[outputName]));
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
return { setOutput };
|
||||||
|
|
||||||
|
}
|
||||||
56
src/setup_repo_webhook_for_deno_land_publishing.ts
Normal file
56
src/setup_repo_webhook_for_deno_land_publishing.ts
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
|
||||||
|
import { setOutputFactory } from "./outputHelper";
|
||||||
|
import { getActionParamsFactory } from "./inputHelper";
|
||||||
|
import { createOctokit } from "./tools/createOctokit";
|
||||||
|
|
||||||
|
export const { getActionParams } = getActionParamsFactory({
|
||||||
|
"inputNameSubset": [
|
||||||
|
"owner",
|
||||||
|
"repo",
|
||||||
|
"should_webhook_be_enabled",
|
||||||
|
"github_token"
|
||||||
|
] as const
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Params = ReturnType<typeof getActionParams>;
|
||||||
|
|
||||||
|
type CoreLike = {
|
||||||
|
debug: (message: string) => void;
|
||||||
|
warning: (message: string) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export const { setOutput } = setOutputFactory<"was_hook_created">();
|
||||||
|
|
||||||
|
export async function action(
|
||||||
|
_actionName: "setup_repo_webhook_for_deno_land_publishing",
|
||||||
|
params: Params,
|
||||||
|
core: CoreLike
|
||||||
|
): Promise<Parameters<typeof setOutput>[0]> {
|
||||||
|
|
||||||
|
const { owner, repo, should_webhook_be_enabled, github_token } = params;
|
||||||
|
|
||||||
|
const octokit = createOctokit({ github_token });
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
await octokit.repos.createWebhook({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
"active": should_webhook_be_enabled === "true",
|
||||||
|
"events": ["create"],
|
||||||
|
"config": {
|
||||||
|
"url": `https://api.deno.land/webhook/gh/${repo}?subdir=deno_dist%252F`,
|
||||||
|
"content_type": "json"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
} catch {
|
||||||
|
|
||||||
|
return { "was_hook_created": "false" };
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return { "was_hook_created": "true" };
|
||||||
|
|
||||||
|
}
|
||||||
39
src/string_replace.ts
Normal file
39
src/string_replace.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
|
||||||
|
import { setOutputFactory } from "./outputHelper";
|
||||||
|
|
||||||
|
import { getActionParamsFactory } from "./inputHelper";
|
||||||
|
|
||||||
|
export const { getActionParams } = getActionParamsFactory({
|
||||||
|
"inputNameSubset": [
|
||||||
|
"input_string",
|
||||||
|
"search_value",
|
||||||
|
"replace_value"
|
||||||
|
] as const
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Params = ReturnType<typeof getActionParams>;
|
||||||
|
|
||||||
|
type CoreLike = {
|
||||||
|
debug: (message: string) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const { setOutput } = setOutputFactory<"replace_result">();
|
||||||
|
|
||||||
|
export async function action(
|
||||||
|
_actionName: "string_replace",
|
||||||
|
params: Params,
|
||||||
|
core: CoreLike
|
||||||
|
): Promise<Parameters<typeof setOutput>[0]> {
|
||||||
|
|
||||||
|
core.debug(JSON.stringify(params));
|
||||||
|
|
||||||
|
const { input_string, search_value, replace_value } = params;
|
||||||
|
|
||||||
|
return {
|
||||||
|
"replace_result": input_string.replace(
|
||||||
|
new RegExp(search_value, "g"),
|
||||||
|
replace_value
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
92
src/sync_package_and_package_lock_version.ts
Normal file
92
src/sync_package_and_package_lock_version.ts
Normal file
|
|
@ -0,0 +1,92 @@
|
||||||
|
import { getActionParamsFactory } from "./inputHelper";
|
||||||
|
import * as st from "scripting-tools";
|
||||||
|
import * as fs from "fs";
|
||||||
|
import { gitCommit } from "./tools/gitCommit";
|
||||||
|
|
||||||
|
export const { getActionParams } = getActionParamsFactory({
|
||||||
|
"inputNameSubset": [
|
||||||
|
"owner",
|
||||||
|
"repo",
|
||||||
|
"branch",
|
||||||
|
"github_token"
|
||||||
|
] as const
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Params = ReturnType<typeof getActionParams>;
|
||||||
|
|
||||||
|
type CoreLike = {
|
||||||
|
debug: (message: string) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function action(
|
||||||
|
_actionName: "sync_package_and_package_lock_version",
|
||||||
|
params: Params,
|
||||||
|
core: CoreLike
|
||||||
|
) {
|
||||||
|
|
||||||
|
core.debug(JSON.stringify(params));
|
||||||
|
|
||||||
|
const { owner, repo, branch, github_token } = params;
|
||||||
|
|
||||||
|
await gitCommit({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
github_token,
|
||||||
|
"commitAuthorEmail": "actions@github.com",
|
||||||
|
"performChanges": async () => {
|
||||||
|
|
||||||
|
await st.exec(`git checkout ${branch}`);
|
||||||
|
|
||||||
|
const { version } = JSON.parse(
|
||||||
|
fs.readFileSync("package.json")
|
||||||
|
.toString("utf8")
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!fs.existsSync("package-lock.json")) {
|
||||||
|
core.debug(`No package-lock.json tracked by ${owner}/${repo}#${branch}`);
|
||||||
|
return { "commit": false };
|
||||||
|
}
|
||||||
|
|
||||||
|
const packageLockJsonRaw = fs.readFileSync("package-lock.json")
|
||||||
|
.toString("utf8")
|
||||||
|
;
|
||||||
|
|
||||||
|
const packageLockJsonParsed = JSON.parse(
|
||||||
|
packageLockJsonRaw
|
||||||
|
);
|
||||||
|
|
||||||
|
if (packageLockJsonParsed.version === version) {
|
||||||
|
core.debug("Nothing to do, version in package.json and package-lock.json are the same");
|
||||||
|
return { "commit": false };
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFileSync(
|
||||||
|
"package-lock.json",
|
||||||
|
Buffer.from(
|
||||||
|
JSON.stringify(
|
||||||
|
(() => {
|
||||||
|
packageLockJsonParsed.version = version;
|
||||||
|
packageLockJsonParsed.packages[""].version = version;
|
||||||
|
return packageLockJsonParsed;
|
||||||
|
})(),
|
||||||
|
null,
|
||||||
|
packageLockJsonRaw
|
||||||
|
.replace(/\t/g, " ")
|
||||||
|
.match(/^(\s*)\"version\"/m)![1].length
|
||||||
|
) + packageLockJsonRaw.match(/}([\r\n]*)$/)![1],
|
||||||
|
"utf8"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return {
|
||||||
|
"commit": true,
|
||||||
|
"addAll": false,
|
||||||
|
"message": "Sync package.json and package.lock version"
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
50
src/tell_if_project_uses_npm_or_yarn.ts
Normal file
50
src/tell_if_project_uses_npm_or_yarn.ts
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
|
||||||
|
import fetch from "node-fetch";
|
||||||
|
const urlJoin: typeof import("path").join = require("url-join");
|
||||||
|
import { setOutputFactory } from "./outputHelper";
|
||||||
|
|
||||||
|
import { getActionParamsFactory } from "./inputHelper";
|
||||||
|
|
||||||
|
export const { getActionParams } = getActionParamsFactory({
|
||||||
|
"inputNameSubset": [
|
||||||
|
"owner",
|
||||||
|
"repo",
|
||||||
|
"branch"
|
||||||
|
] as const
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Params = ReturnType<typeof getActionParams>;
|
||||||
|
|
||||||
|
type CoreLike = {
|
||||||
|
debug: (message: string) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const { setOutput } = setOutputFactory<"npm_or_yarn">();
|
||||||
|
|
||||||
|
export async function action(
|
||||||
|
_actionName: "tell_if_project_uses_npm_or_yarn",
|
||||||
|
params: Params,
|
||||||
|
core: CoreLike
|
||||||
|
): Promise<Parameters<typeof setOutput>[0]> {
|
||||||
|
|
||||||
|
core.debug(JSON.stringify(params));
|
||||||
|
|
||||||
|
const { owner, repo } = params;
|
||||||
|
|
||||||
|
const branch = params.branch.split("/").reverse()[0];
|
||||||
|
|
||||||
|
const npm_or_yarn = await fetch(
|
||||||
|
urlJoin(
|
||||||
|
"https://raw.github.com",
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
branch,
|
||||||
|
"yarn.lock"
|
||||||
|
)
|
||||||
|
).then(res => res.status === 404 ? "npm" : "yarn")
|
||||||
|
|
||||||
|
core.debug(`Version on ${owner}/${repo}#${branch} is using ${npm_or_yarn}`);
|
||||||
|
|
||||||
|
return { npm_or_yarn };
|
||||||
|
|
||||||
|
}
|
||||||
17
src/test/dispatch_event.ts
Normal file
17
src/test/dispatch_event.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import { action } from "../dispatch_event";
|
||||||
|
|
||||||
|
action(
|
||||||
|
"dispatch_event",
|
||||||
|
{
|
||||||
|
"owner": "garronej",
|
||||||
|
"repo": "test-repo",
|
||||||
|
"event_type": "example-event",
|
||||||
|
"client_payload_json": JSON.stringify({ "foo": "bar" }),
|
||||||
|
"github_token": ""
|
||||||
|
},
|
||||||
|
{ "debug": console.log }
|
||||||
|
);
|
||||||
|
|
||||||
20
src/test/getCommitAhead.ts
Normal file
20
src/test/getCommitAhead.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { createOctokit } from "../tools/createOctokit";
|
||||||
|
import { getCommitAheadFactory } from "../tools/octokit-addons/getCommitAhead";
|
||||||
|
|
||||||
|
(async ()=>{
|
||||||
|
|
||||||
|
const octokit = createOctokit({ "github_token": "" });
|
||||||
|
|
||||||
|
const { getCommitAhead } = getCommitAheadFactory({ octokit });
|
||||||
|
|
||||||
|
const { commits } = await getCommitAhead({
|
||||||
|
"owner": "InseeFrLab",
|
||||||
|
"repo": "keycloakify",
|
||||||
|
"branchBehind": "v4.5.1",
|
||||||
|
"branchAhead": "Ann2827/pull"
|
||||||
|
}).catch(() => ({ "commits": undefined }));
|
||||||
|
|
||||||
|
console.log(commits);
|
||||||
|
|
||||||
|
|
||||||
|
})()
|
||||||
22
src/test/get_package_json_version.ts
Normal file
22
src/test/get_package_json_version.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import { action } from "../get_package_json_version";
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
|
||||||
|
const repo = "denoify";
|
||||||
|
|
||||||
|
const result = await action("get_package_json_version", {
|
||||||
|
"owner": "garronej",
|
||||||
|
repo,
|
||||||
|
"branch": "aa5da60301bea4cf0e80e98a4579f7076b544a44",
|
||||||
|
"compare_to_version": "0.0.0"
|
||||||
|
}, { "debug": console.log });
|
||||||
|
|
||||||
|
console.log(result);
|
||||||
|
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
|
|
||||||
20
src/test/is_package_json_version_upgraded.ts
Normal file
20
src/test/is_package_json_version_upgraded.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
|
||||||
|
import { action } from "../is_package_json_version_upgraded";
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
|
||||||
|
const repo = "keycloakify-demo-app";
|
||||||
|
|
||||||
|
const result = await action("is_package_json_version_upgraded", {
|
||||||
|
"owner": "InseeFrLab",
|
||||||
|
repo,
|
||||||
|
"branch": "4fc0ccb46bdb3912e0a215ca3ae45aed458ea6a4",
|
||||||
|
"github_token": ""
|
||||||
|
}, { "debug": console.log });
|
||||||
|
|
||||||
|
console.log(result);
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
|
|
||||||
33
src/test/is_well_formed_and_available_module_name.ts
Normal file
33
src/test/is_well_formed_and_available_module_name.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import { action } from "../is_well_formed_and_available_module_name";
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
|
||||||
|
|
||||||
|
for (const module_name of [
|
||||||
|
"congenial_pancake",
|
||||||
|
"evt",
|
||||||
|
"_okay",
|
||||||
|
"mai-oui-c-clair"
|
||||||
|
]) {
|
||||||
|
|
||||||
|
console.log({ module_name });
|
||||||
|
|
||||||
|
const resp = await action(
|
||||||
|
"is_well_formed_and_available_module_name",
|
||||||
|
{ module_name },
|
||||||
|
{ "debug": console.log }
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log(resp);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
|
|
||||||
27
src/test/setup_repo_webhook_for_deno_land_publishing.ts
Normal file
27
src/test/setup_repo_webhook_for_deno_land_publishing.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
|
||||||
|
import { action } from "../setup_repo_webhook_for_deno_land_publishing";
|
||||||
|
import * as st from "scripting-tools";
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
|
||||||
|
st.enableCmdTrace();
|
||||||
|
|
||||||
|
const repo = "reimagined_octo_winner_kay";
|
||||||
|
|
||||||
|
const resp = await action(
|
||||||
|
"setup_repo_webhook_for_deno_land_publishing",
|
||||||
|
{
|
||||||
|
"owner": "garronej",
|
||||||
|
"repo": "reimagined_octo_winner_kay",
|
||||||
|
"should_webhook_be_enabled": "false",
|
||||||
|
"github_token": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"debug": console.log,
|
||||||
|
"warning": console.warn
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log(resp);
|
||||||
|
|
||||||
|
})();
|
||||||
17
src/test/string_replace.ts
Normal file
17
src/test/string_replace.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
import { action } from "../string_replace";
|
||||||
|
import * as st from "scripting-tools";
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
|
||||||
|
const { replace_result } = await action("string_replace", {
|
||||||
|
"input_string": "octo-computing-machine",
|
||||||
|
"search_value": "-",
|
||||||
|
"replace_value": "_"
|
||||||
|
},
|
||||||
|
{ "debug": console.log }
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log({ replace_result });
|
||||||
|
|
||||||
|
})();
|
||||||
20
src/test/sync_package_and_package_lock_version.ts
Normal file
20
src/test/sync_package_and_package_lock_version.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
|
||||||
|
import { action } from "../sync_package_and_package_lock_version";
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
|
||||||
|
const repo = "literate-sniffle";
|
||||||
|
|
||||||
|
await action("sync_package_and_package_lock_version", {
|
||||||
|
"owner": "garronej",
|
||||||
|
repo,
|
||||||
|
"branch": "master",
|
||||||
|
"github_token": ""
|
||||||
|
},
|
||||||
|
{ "debug": console.log }
|
||||||
|
);
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
|
|
||||||
17
src/test/tell_if_project_uses_npm_or_yarn.ts
Normal file
17
src/test/tell_if_project_uses_npm_or_yarn.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
|
||||||
|
import { action } from "../tell_if_project_uses_npm_or_yarn";
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
|
||||||
|
const repo = "powerhooks";
|
||||||
|
|
||||||
|
await action("tell_if_project_uses_npm_or_yarn", {
|
||||||
|
"owner": "garronej",
|
||||||
|
repo,
|
||||||
|
"branch": "refs/heads/master"
|
||||||
|
},
|
||||||
|
{ "debug": console.log }
|
||||||
|
);
|
||||||
|
|
||||||
|
})();
|
||||||
25
src/test/update_changelog.ts
Normal file
25
src/test/update_changelog.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
import { action } from "../update_changelog";
|
||||||
|
import * as st from "scripting-tools";
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
|
||||||
|
st.enableCmdTrace();
|
||||||
|
|
||||||
|
const repo = "sturdy_umbrella";
|
||||||
|
|
||||||
|
await action("update_changelog", {
|
||||||
|
"owner": "garronej",
|
||||||
|
repo,
|
||||||
|
"branch": "dev",
|
||||||
|
"exclude_commit_from_author_names_json": JSON.stringify(["denoify_ci"]),
|
||||||
|
"github_token": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"debug": console.log,
|
||||||
|
"warning": console.log
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
})();
|
||||||
94
src/tools/NpmModuleVersion.ts
Normal file
94
src/tools/NpmModuleVersion.ts
Normal file
|
|
@ -0,0 +1,94 @@
|
||||||
|
|
||||||
|
|
||||||
|
export type NpmModuleVersion = {
|
||||||
|
major: number;
|
||||||
|
minor: number;
|
||||||
|
patch: number;
|
||||||
|
betaPreRelease?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export namespace NpmModuleVersion {
|
||||||
|
|
||||||
|
export function parse(versionStr: string): NpmModuleVersion {
|
||||||
|
|
||||||
|
const match = versionStr.match(/^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-beta.([0-9]+))?/);
|
||||||
|
|
||||||
|
if (!match) {
|
||||||
|
throw new Error(`${versionStr} is not a valid NPM version`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
"major": parseInt(match[1]),
|
||||||
|
"minor": parseInt(match[2]),
|
||||||
|
"patch": parseInt(match[3]),
|
||||||
|
...(() => {
|
||||||
|
|
||||||
|
const str = match[4];
|
||||||
|
return str === undefined ?
|
||||||
|
{} :
|
||||||
|
{ "betaPreRelease": parseInt(str) };
|
||||||
|
|
||||||
|
})()
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
export function stringify(v: NpmModuleVersion) {
|
||||||
|
return `${v.major}.${v.minor}.${v.patch}${v.betaPreRelease === undefined ? "" : `-beta.${v.betaPreRelease}`}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* v1 < v2 => -1
|
||||||
|
* v1 === v2 => 0
|
||||||
|
* v1 > v2 => 1
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export function compare(v1: NpmModuleVersion, v2: NpmModuleVersion): -1 | 0 | 1 {
|
||||||
|
|
||||||
|
const sign = (diff: number): -1 | 0 | 1 => diff === 0 ? 0 : (diff < 0 ? -1 : 1);
|
||||||
|
const noUndefined= (n: number | undefined)=> n ?? Infinity;
|
||||||
|
|
||||||
|
for (const level of ["major", "minor", "patch", "betaPreRelease"] as const) {
|
||||||
|
if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
|
||||||
|
return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
console.log(compare(parse("3.0.0-beta.3"), parse("3.0.0")) === -1 )
|
||||||
|
console.log(compare(parse("3.0.0-beta.3"), parse("3.0.0-beta.4")) === -1 )
|
||||||
|
console.log(compare(parse("3.0.0-beta.3"), parse("4.0.0")) === -1 )
|
||||||
|
*/
|
||||||
|
|
||||||
|
export function bumpType(
|
||||||
|
params: {
|
||||||
|
versionBehindStr: string;
|
||||||
|
versionAheadStr: string;
|
||||||
|
}
|
||||||
|
): "major" | "minor" | "patch" | "betaPreRelease" | "same" {
|
||||||
|
|
||||||
|
|
||||||
|
const versionAhead = parse(params.versionAheadStr);
|
||||||
|
const versionBehind = parse(params.versionBehindStr);
|
||||||
|
|
||||||
|
if (compare(versionBehind, versionAhead) === 1) {
|
||||||
|
throw new Error(`Version regression ${versionBehind} -> ${versionAhead}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const level of ["major", "minor", "patch", "betaPreRelease"] as const) {
|
||||||
|
if (versionBehind[level] !== versionAhead[level]) {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return "same";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
/** @see <https://docs.tsafe.dev/capitalize> */
|
|
||||||
export function capitalize<S extends string>(str: S): Capitalize<S> {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
return (str.charAt(0).toUpperCase() + str.slice(1)) as any;
|
|
||||||
}
|
|
||||||
10
src/tools/createOctokit.ts
Normal file
10
src/tools/createOctokit.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
import { Octokit } from "@octokit/rest";
|
||||||
|
|
||||||
|
export function createOctokit(params: { github_token: string; }) {
|
||||||
|
|
||||||
|
const { github_token } = params;
|
||||||
|
|
||||||
|
return new Octokit({ ...(github_token !== "" ? { "auth": github_token } : {}) });
|
||||||
|
|
||||||
|
}
|
||||||
60
src/tools/gitCommit.ts
Normal file
60
src/tools/gitCommit.ts
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
import * as st from "scripting-tools";
|
||||||
|
|
||||||
|
export async function gitCommit(
|
||||||
|
params: {
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
commitAuthorEmail: string;
|
||||||
|
performChanges: () => Promise<{ commit: false; } | { commit: true; addAll: boolean; message: string; }>;
|
||||||
|
github_token: string;
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
|
||||||
|
const { owner, repo, commitAuthorEmail, performChanges, github_token } = params;
|
||||||
|
|
||||||
|
await st.exec(`git clone https://github.com/${owner}/${repo}`);
|
||||||
|
|
||||||
|
const cwd = process.cwd();
|
||||||
|
|
||||||
|
process.chdir(repo);
|
||||||
|
|
||||||
|
const changesResult = await (async () => {
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
return await performChanges();
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
return error as Error;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})()
|
||||||
|
|
||||||
|
if (!(changesResult instanceof Error) && changesResult.commit) {
|
||||||
|
|
||||||
|
await st.exec(`git config --local user.email "${commitAuthorEmail}"`);
|
||||||
|
await st.exec(`git config --local user.name "${commitAuthorEmail.split("@")[0]}"`);
|
||||||
|
|
||||||
|
if (changesResult.addAll) {
|
||||||
|
|
||||||
|
await st.exec(`git add -A`);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
await st.exec(`git commit -am "${changesResult.message}"`);
|
||||||
|
|
||||||
|
await st.exec(`git push "https://${owner}:${github_token}@github.com/${owner}/${repo}.git"`);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
process.chdir(cwd);
|
||||||
|
|
||||||
|
await st.exec(`rm -r ${repo}`);
|
||||||
|
|
||||||
|
if (changesResult instanceof Error) {
|
||||||
|
throw changesResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export * from "./capitalize";
|
|
||||||
6
src/tools/is404.ts
Normal file
6
src/tools/is404.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
import fetch from "node-fetch";
|
||||||
|
|
||||||
|
export function is404(url: string): Promise<boolean> {
|
||||||
|
return fetch(url).then(({ status }) => status === 404);
|
||||||
|
}
|
||||||
55
src/tools/octokit-addons/getCommitAhead.ts
Normal file
55
src/tools/octokit-addons/getCommitAhead.ts
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
|
||||||
|
import { getCommonOriginFactory } from "./getCommonOrigin";
|
||||||
|
import { listCommitFactory } from "./listCommit";
|
||||||
|
import type { Commit } from "./getCommitAsyncIterable";
|
||||||
|
import type { Octokit } from "@octokit/rest";
|
||||||
|
|
||||||
|
/** Take two branch that have a common origin and list all the
|
||||||
|
* commit that have been made on the branch that is ahead since it
|
||||||
|
* has been forked from the branch that is behind.
|
||||||
|
* From the older to the newest.
|
||||||
|
* */
|
||||||
|
export function getCommitAheadFactory(
|
||||||
|
params: { octokit: Octokit; }
|
||||||
|
) {
|
||||||
|
|
||||||
|
const { octokit } = params;
|
||||||
|
|
||||||
|
const { getCommonOrigin } = getCommonOriginFactory({ octokit });
|
||||||
|
const { listCommit } = listCommitFactory({ octokit });
|
||||||
|
|
||||||
|
async function getCommitAhead(
|
||||||
|
params: {
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
branchBehind: string;
|
||||||
|
branchAhead: string;
|
||||||
|
}
|
||||||
|
): Promise<{ commits: Commit[]; }> {
|
||||||
|
|
||||||
|
const { owner, repo, branchBehind, branchAhead } = params;
|
||||||
|
|
||||||
|
const { sha } = await getCommonOrigin({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
"branch1": branchBehind,
|
||||||
|
"branch2": branchAhead
|
||||||
|
});
|
||||||
|
|
||||||
|
const commits = await listCommit({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
"branch": branchAhead,
|
||||||
|
sha
|
||||||
|
});
|
||||||
|
|
||||||
|
return { commits };
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return { getCommitAhead };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
100
src/tools/octokit-addons/getCommitAsyncIterable.ts
Normal file
100
src/tools/octokit-addons/getCommitAsyncIterable.ts
Normal file
|
|
@ -0,0 +1,100 @@
|
||||||
|
|
||||||
|
import type { AsyncReturnType } from "evt/dist/tools/typeSafety/AsyncReturnType";
|
||||||
|
import type { Octokit } from "@octokit/rest";
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
.sha
|
||||||
|
.commit.message
|
||||||
|
.author.type
|
||||||
|
.author.type !== "User"
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Alias for the non exported ReposListCommitsResponseData type alias */
|
||||||
|
export type Commit = AsyncReturnType<Octokit["repos"]["listCommits"]>["data"][number];
|
||||||
|
|
||||||
|
const per_page = 30;
|
||||||
|
|
||||||
|
/** Iterate over the commits of a repo's branch */
|
||||||
|
export function getCommitAsyncIterableFactory(params: { octokit: Octokit; }) {
|
||||||
|
|
||||||
|
const { octokit } = params;
|
||||||
|
|
||||||
|
function getCommitAsyncIterable(
|
||||||
|
params: {
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
branch: string;
|
||||||
|
}
|
||||||
|
): AsyncIterable<Commit> {
|
||||||
|
|
||||||
|
const { owner, repo, branch } = params;
|
||||||
|
|
||||||
|
let commits: Commit[] = [];
|
||||||
|
|
||||||
|
let page = 0;
|
||||||
|
|
||||||
|
let isLastPage: boolean | undefined = undefined;
|
||||||
|
|
||||||
|
const getReposListCommitsResponseData = (params: { page: number }) =>
|
||||||
|
octokit.repos.listCommits({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
per_page,
|
||||||
|
"page": params.page,
|
||||||
|
"sha": branch
|
||||||
|
}).then(({ data }) => data)
|
||||||
|
;
|
||||||
|
|
||||||
|
return {
|
||||||
|
[Symbol.asyncIterator]() {
|
||||||
|
return {
|
||||||
|
"next": async ()=> {
|
||||||
|
|
||||||
|
if (commits.length === 0) {
|
||||||
|
|
||||||
|
if (isLastPage) {
|
||||||
|
return { "done": true, "value": undefined };
|
||||||
|
}
|
||||||
|
|
||||||
|
page++;
|
||||||
|
|
||||||
|
commits = await getReposListCommitsResponseData({ page });
|
||||||
|
|
||||||
|
if (commits.length === 0) {
|
||||||
|
return { "done": true, "value": undefined };
|
||||||
|
}
|
||||||
|
|
||||||
|
isLastPage =
|
||||||
|
commits.length !== per_page ||
|
||||||
|
(await getReposListCommitsResponseData({ "page": page + 1 })).length === 0
|
||||||
|
;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const [commit, ...rest] = commits;
|
||||||
|
|
||||||
|
commits = rest;
|
||||||
|
|
||||||
|
return {
|
||||||
|
"value": commit,
|
||||||
|
"done": false
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return { getCommitAsyncIterable };
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
90
src/tools/octokit-addons/getCommonOrigin.ts
Normal file
90
src/tools/octokit-addons/getCommonOrigin.ts
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
|
||||||
|
import { getCommitAsyncIterableFactory } from "./getCommitAsyncIterable";
|
||||||
|
import type { Octokit } from "@octokit/rest";
|
||||||
|
|
||||||
|
/** Return the sha of the first common commit between two branches */
|
||||||
|
export function getCommonOriginFactory(params: { octokit: Octokit; }) {
|
||||||
|
|
||||||
|
const { octokit } = params;
|
||||||
|
|
||||||
|
const { getCommitAsyncIterable } = getCommitAsyncIterableFactory({ octokit });
|
||||||
|
|
||||||
|
async function getCommonOrigin(
|
||||||
|
params: {
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
branch1: string;
|
||||||
|
branch2: string;
|
||||||
|
}
|
||||||
|
): Promise<{ sha: string; }> {
|
||||||
|
|
||||||
|
const { owner, repo, branch1, branch2 } = params;
|
||||||
|
|
||||||
|
const [
|
||||||
|
commitAsyncIterable1,
|
||||||
|
commitAsyncIterable2
|
||||||
|
] = ([branch1, branch2] as const)
|
||||||
|
.map(branch => getCommitAsyncIterable({ owner, repo, branch }))
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
let shas1: string[] = [];
|
||||||
|
let shas2: string[] = [];
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
|
||||||
|
const [
|
||||||
|
itRes1,
|
||||||
|
itRes2
|
||||||
|
] =
|
||||||
|
await Promise.all(
|
||||||
|
([commitAsyncIterable1, commitAsyncIterable2] as const)
|
||||||
|
.map(
|
||||||
|
commitAsyncIterable => commitAsyncIterable[Symbol.asyncIterator]()
|
||||||
|
.next()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
;
|
||||||
|
|
||||||
|
let sha1: string | undefined = undefined;
|
||||||
|
|
||||||
|
if (!itRes1.done) {
|
||||||
|
|
||||||
|
sha1 = itRes1.value.sha;
|
||||||
|
|
||||||
|
shas1.push(sha1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
let sha2: string | undefined = undefined;
|
||||||
|
|
||||||
|
if (!itRes2.done) {
|
||||||
|
|
||||||
|
sha2 = itRes2.value.sha;
|
||||||
|
|
||||||
|
shas2.push(sha2);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!!sha1 && shas2.includes(sha1)) {
|
||||||
|
return { "sha": sha1 };
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!!sha2 && shas1.includes(sha2)) {
|
||||||
|
return { "sha": sha2 };
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itRes1.done && itRes2.done) {
|
||||||
|
throw new Error("No common origin");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return { getCommonOrigin };
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
54
src/tools/octokit-addons/getLatestSemVersionedTag.ts
Normal file
54
src/tools/octokit-addons/getLatestSemVersionedTag.ts
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
|
||||||
|
import { listTagsFactory } from "./listTags";
|
||||||
|
import type { Octokit } from "@octokit/rest";
|
||||||
|
import { NpmModuleVersion } from "../NpmModuleVersion";
|
||||||
|
|
||||||
|
export function getLatestSemVersionedTagFactory(params: { octokit: Octokit; }) {
|
||||||
|
|
||||||
|
const { octokit } = params;
|
||||||
|
|
||||||
|
async function getLatestSemVersionedTag(
|
||||||
|
params: {
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
doIgnoreBeta: boolean;
|
||||||
|
}
|
||||||
|
): Promise<{
|
||||||
|
tag: string;
|
||||||
|
version: NpmModuleVersion;
|
||||||
|
} | undefined> {
|
||||||
|
|
||||||
|
const { owner, repo, doIgnoreBeta } = params;
|
||||||
|
|
||||||
|
const semVersionedTags: { tag: string; version: NpmModuleVersion; }[] = [];
|
||||||
|
|
||||||
|
const { listTags } = listTagsFactory({ octokit });
|
||||||
|
|
||||||
|
for await (const tag of listTags({ owner, repo })) {
|
||||||
|
|
||||||
|
let version: NpmModuleVersion;
|
||||||
|
|
||||||
|
try{
|
||||||
|
|
||||||
|
version = NpmModuleVersion.parse(tag.replace(/^[vV]?/, ""));
|
||||||
|
|
||||||
|
}catch{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( doIgnoreBeta && version.betaPreRelease !== undefined ){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
semVersionedTags.push({ tag, version });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return semVersionedTags
|
||||||
|
.sort(({ version: vX }, { version: vY }) => NpmModuleVersion.compare(vY, vX))[0];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
return { getLatestSemVersionedTag };
|
||||||
|
|
||||||
|
}
|
||||||
93
src/tools/octokit-addons/getPullRequestAsyncIterable.ts
Normal file
93
src/tools/octokit-addons/getPullRequestAsyncIterable.ts
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
|
||||||
|
import type { AsyncReturnType } from "evt/dist/tools/typeSafety/AsyncReturnType";
|
||||||
|
import type { Octokit } from "@octokit/rest";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** Alias for the non exported PullsListResponseData type alias */
|
||||||
|
export type PullRequest = AsyncReturnType<Octokit["pulls"]["list"]>["data"][number];
|
||||||
|
|
||||||
|
const per_page = 99;
|
||||||
|
|
||||||
|
export function getPullRequestAsyncIterableFactory(params: { octokit: Octokit; }) {
|
||||||
|
|
||||||
|
const { octokit } = params;
|
||||||
|
|
||||||
|
function getPullRequestAsyncIterable(
|
||||||
|
params: {
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
state: "open" | "closed" | "all"
|
||||||
|
}
|
||||||
|
): AsyncIterable<PullRequest> {
|
||||||
|
|
||||||
|
const { owner, repo, state } = params;
|
||||||
|
|
||||||
|
let pullRequests: PullRequest[] = [];
|
||||||
|
|
||||||
|
let page = 0;
|
||||||
|
|
||||||
|
let isLastPage: boolean | undefined = undefined;
|
||||||
|
|
||||||
|
const getPullsListResponseData = (params: { page: number }) =>
|
||||||
|
octokit.pulls.list({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
state,
|
||||||
|
per_page,
|
||||||
|
"page": params.page
|
||||||
|
}).then(({ data }) => data)
|
||||||
|
;
|
||||||
|
|
||||||
|
return {
|
||||||
|
[Symbol.asyncIterator]() {
|
||||||
|
return {
|
||||||
|
"next": async ()=> {
|
||||||
|
|
||||||
|
if (pullRequests.length === 0) {
|
||||||
|
|
||||||
|
if (isLastPage) {
|
||||||
|
return { "done": true, "value": undefined };
|
||||||
|
}
|
||||||
|
|
||||||
|
page++;
|
||||||
|
|
||||||
|
pullRequests = await getPullsListResponseData({ page });
|
||||||
|
|
||||||
|
if (pullRequests.length === 0) {
|
||||||
|
return { "done": true, "value": undefined };
|
||||||
|
}
|
||||||
|
|
||||||
|
isLastPage =
|
||||||
|
pullRequests.length !== per_page ||
|
||||||
|
(await getPullsListResponseData({ "page": page + 1 })).length === 0
|
||||||
|
;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const [pullRequest, ...rest] = pullRequests;
|
||||||
|
|
||||||
|
pullRequests = rest;
|
||||||
|
|
||||||
|
return {
|
||||||
|
"value": pullRequest,
|
||||||
|
"done": false
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return { getPullRequestAsyncIterable };
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
4
src/tools/octokit-addons/index.ts
Normal file
4
src/tools/octokit-addons/index.ts
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
export { getCommitAheadFactory as getChangeLogFactory } from "./getCommitAhead";
|
||||||
|
export { Commit, getCommitAsyncIterableFactory } from "./getCommitAsyncIterable";
|
||||||
|
export { getCommonOriginFactory } from "./getCommonOrigin";
|
||||||
|
export { listCommitFactory } from "./listCommit";
|
||||||
51
src/tools/octokit-addons/listCommit.ts
Normal file
51
src/tools/octokit-addons/listCommit.ts
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
|
||||||
|
import type { Octokit } from "@octokit/rest";
|
||||||
|
import { getCommitAsyncIterableFactory } from "./getCommitAsyncIterable";
|
||||||
|
import type { Commit } from "./getCommitAsyncIterable";
|
||||||
|
|
||||||
|
/** Return the list of commit since given sha (excluded)
|
||||||
|
* ordered from the oldest to the newest */
|
||||||
|
export function listCommitFactory(
|
||||||
|
params: { octokit: Octokit }
|
||||||
|
) {
|
||||||
|
|
||||||
|
const { octokit } = params;
|
||||||
|
|
||||||
|
const { getCommitAsyncIterable } = getCommitAsyncIterableFactory({ octokit });
|
||||||
|
|
||||||
|
async function listCommit(
|
||||||
|
params: {
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
branch: string;
|
||||||
|
sha: string;
|
||||||
|
}
|
||||||
|
): Promise<Commit[]> {
|
||||||
|
|
||||||
|
const { owner, repo, branch, sha } = params;
|
||||||
|
|
||||||
|
const commitAsyncIterable = getCommitAsyncIterable({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
branch
|
||||||
|
});
|
||||||
|
|
||||||
|
const commits: Commit[]= [];
|
||||||
|
|
||||||
|
for await (const commit of commitAsyncIterable) {
|
||||||
|
|
||||||
|
if( commit.sha === sha ){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
commits.push(commit);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return commits.reverse();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return { listCommit };
|
||||||
|
|
||||||
|
}
|
||||||
82
src/tools/octokit-addons/listTags.ts
Normal file
82
src/tools/octokit-addons/listTags.ts
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
import type { Octokit } from "@octokit/rest";
|
||||||
|
|
||||||
|
const per_page = 99;
|
||||||
|
|
||||||
|
export function listTagsFactory(params: { octokit: Octokit; }) {
|
||||||
|
|
||||||
|
const { octokit } = params;
|
||||||
|
|
||||||
|
const octokit_repo_listTags = (
|
||||||
|
async (
|
||||||
|
params: {
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
per_page: number;
|
||||||
|
page: number;
|
||||||
|
}
|
||||||
|
) => {
|
||||||
|
|
||||||
|
return octokit.repos.listTags(params);
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
async function* listTags(
|
||||||
|
params: {
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
}
|
||||||
|
): AsyncGenerator<string> {
|
||||||
|
|
||||||
|
const { owner, repo } = params;
|
||||||
|
|
||||||
|
let page = 1;
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
|
||||||
|
const resp = await octokit_repo_listTags({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
per_page,
|
||||||
|
"page": page++
|
||||||
|
});
|
||||||
|
|
||||||
|
for (const branch of resp.data.map(({ name }) => name)) {
|
||||||
|
yield branch;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (resp.data.length < 99) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** Returns the same "latest" tag as deno.land/x, not actually the latest though */
|
||||||
|
async function getLatestTag(
|
||||||
|
params: {
|
||||||
|
owner: string;
|
||||||
|
repo: string;
|
||||||
|
}
|
||||||
|
): Promise<string | undefined> {
|
||||||
|
|
||||||
|
const { owner, repo } = params;
|
||||||
|
|
||||||
|
const itRes = await listTags({ owner, repo }).next();
|
||||||
|
|
||||||
|
if (itRes.done) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return itRes.value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return { listTags, getLatestTag };
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
22
src/tools/test/octokit-addons/getChangeLog.ts
Normal file
22
src/tools/test/octokit-addons/getChangeLog.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
import { getCommitAheadFactory } from "../../octokit-addons/getCommitAhead";
|
||||||
|
import { Octokit } from "@octokit/rest";
|
||||||
|
|
||||||
|
(async ()=>{
|
||||||
|
|
||||||
|
const octokit = new Octokit();
|
||||||
|
|
||||||
|
const { getCommitAhead } = getCommitAheadFactory({ octokit });
|
||||||
|
|
||||||
|
const { commits } = await getCommitAhead({
|
||||||
|
"owner": "garronej",
|
||||||
|
"repo": "test-repo",
|
||||||
|
"branchBehind": "garronej-patch-1",
|
||||||
|
"branchAhead": "master"
|
||||||
|
});
|
||||||
|
|
||||||
|
const messages = commits.map(({ commit })=> commit.message );
|
||||||
|
|
||||||
|
console.log(JSON.stringify(messages, null, 2));
|
||||||
|
|
||||||
|
})();
|
||||||
28
src/tools/test/octokit-addons/getCommitAsyncIterable.ts
Normal file
28
src/tools/test/octokit-addons/getCommitAsyncIterable.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
|
||||||
|
import { getCommitAsyncIterableFactory } from "../../octokit-addons/getCommitAsyncIterable";
|
||||||
|
import { createOctokit } from "../../createOctokit";
|
||||||
|
|
||||||
|
|
||||||
|
(async function () {
|
||||||
|
|
||||||
|
const octokit = createOctokit({ "github_token": "" });
|
||||||
|
|
||||||
|
const { getCommitAsyncIterable } = getCommitAsyncIterableFactory({ octokit });
|
||||||
|
|
||||||
|
const commitAsyncIterable = getCommitAsyncIterable({
|
||||||
|
"owner": "garronej",
|
||||||
|
"repo": "test-repo",
|
||||||
|
"branch": "master"
|
||||||
|
});
|
||||||
|
|
||||||
|
for await (const commit of commitAsyncIterable) {
|
||||||
|
console.log(commit.commit.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("done");
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
23
src/tools/test/octokit-addons/getCommonOrigin.ts
Normal file
23
src/tools/test/octokit-addons/getCommonOrigin.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
import { getCommonOriginFactory } from "../../octokit-addons/getCommonOrigin";
|
||||||
|
import { Octokit } from "@octokit/rest";
|
||||||
|
|
||||||
|
|
||||||
|
(async function () {
|
||||||
|
|
||||||
|
const octokit = new Octokit();
|
||||||
|
|
||||||
|
const { getCommonOrigin } = getCommonOriginFactory({ octokit });
|
||||||
|
|
||||||
|
const { sha } = await getCommonOrigin({
|
||||||
|
"owner": "garronej",
|
||||||
|
"repo": "test-repo",
|
||||||
|
"branch1": "master",
|
||||||
|
"branch2": "garronej-patch-1"
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log({ sha });
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
|
|
||||||
21
src/tools/test/octokit-addons/listCommit.ts
Normal file
21
src/tools/test/octokit-addons/listCommit.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
import { listCommitFactory } from "../../octokit-addons/listCommit";
|
||||||
|
import { createOctokit } from "../../createOctokit";
|
||||||
|
|
||||||
|
(async ()=>{
|
||||||
|
|
||||||
|
const octokit = createOctokit({ "github_token": "" });
|
||||||
|
|
||||||
|
|
||||||
|
const { listCommit } = listCommitFactory({ octokit });
|
||||||
|
|
||||||
|
const commits= await listCommit({
|
||||||
|
"owner": "garronej",
|
||||||
|
"repo": "supreme_tribble",
|
||||||
|
"branch": "dev",
|
||||||
|
"sha": "84792f5719d0812e6917051b5c6331891187ca20"
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(JSON.stringify(commits, null, 2));
|
||||||
|
|
||||||
|
})();
|
||||||
202
src/update_changelog.ts
Normal file
202
src/update_changelog.ts
Normal file
|
|
@ -0,0 +1,202 @@
|
||||||
|
|
||||||
|
import { getActionParamsFactory } from "./inputHelper";
|
||||||
|
import * as st from "scripting-tools";
|
||||||
|
import { getCommitAheadFactory } from "./tools/octokit-addons/getCommitAhead";
|
||||||
|
import * as get_package_json_version from "./get_package_json_version";
|
||||||
|
import * as fs from "fs";
|
||||||
|
import { NpmModuleVersion } from "./tools/NpmModuleVersion";
|
||||||
|
import { gitCommit } from "./tools/gitCommit";
|
||||||
|
import { getLatestSemVersionedTagFactory } from "./tools/octokit-addons/getLatestSemVersionedTag";
|
||||||
|
import { createOctokit } from "./tools/createOctokit";
|
||||||
|
import { assert } from "tsafe/assert";
|
||||||
|
|
||||||
|
export const { getActionParams } = getActionParamsFactory({
|
||||||
|
"inputNameSubset": [
|
||||||
|
"owner",
|
||||||
|
"repo",
|
||||||
|
"branch",
|
||||||
|
"exclude_commit_from_author_names_json",
|
||||||
|
"github_token"
|
||||||
|
] as const
|
||||||
|
});
|
||||||
|
|
||||||
|
export type Params = ReturnType<typeof getActionParams>;
|
||||||
|
|
||||||
|
type CoreLike = {
|
||||||
|
debug: (message: string) => void;
|
||||||
|
warning: (message: string)=> void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function action(
|
||||||
|
_actionName: "update_changelog",
|
||||||
|
params: Params,
|
||||||
|
core: CoreLike
|
||||||
|
) {
|
||||||
|
|
||||||
|
const {
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
github_token
|
||||||
|
} = params;
|
||||||
|
|
||||||
|
const branch = params.branch.split("/").reverse()[0];
|
||||||
|
|
||||||
|
core.debug(`params: ${JSON.stringify(params)}`);
|
||||||
|
|
||||||
|
const exclude_commit_from_author_names: string[] =
|
||||||
|
JSON.parse(params.exclude_commit_from_author_names_json)
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
const octokit = createOctokit({ github_token });
|
||||||
|
|
||||||
|
const { getCommitAhead } = getCommitAheadFactory({ octokit });
|
||||||
|
|
||||||
|
const { getLatestSemVersionedTag } = getLatestSemVersionedTagFactory({ octokit });
|
||||||
|
|
||||||
|
const { tag: branchBehind } = (await getLatestSemVersionedTag({ owner, repo, "doIgnoreBeta": true })) ?? {};
|
||||||
|
|
||||||
|
if( branchBehind === undefined ){
|
||||||
|
|
||||||
|
core.warning(`It's the first release, not editing the CHANGELOG.md`);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const { commits } = await getCommitAhead({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
branchBehind,
|
||||||
|
"branchAhead": branch
|
||||||
|
}).catch(() => ({ "commits": undefined }));
|
||||||
|
|
||||||
|
if( commits === undefined ){
|
||||||
|
|
||||||
|
core.warning(`${owner}/${repo}#${branchBehind} probably does not exist ( branch: ${branch})`);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const [
|
||||||
|
branchBehindVersion,
|
||||||
|
branchAheadVersion
|
||||||
|
] = await Promise.all(
|
||||||
|
([branchBehind, branch] as const)
|
||||||
|
.map(branch =>
|
||||||
|
get_package_json_version.action(
|
||||||
|
"get_package_json_version",
|
||||||
|
{
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
branch,
|
||||||
|
"compare_to_version": "0.0.0"
|
||||||
|
},
|
||||||
|
core
|
||||||
|
).then(({ version }) => version)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if( NpmModuleVersion.parse(branchAheadVersion).betaPreRelease !== undefined ){
|
||||||
|
|
||||||
|
core.warning(`Version on ${branch} is ${branchAheadVersion} it's a beta release, we do not update the CHANGELOG.md`);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const bumpType = NpmModuleVersion.bumpType({
|
||||||
|
"versionAheadStr": branchAheadVersion,
|
||||||
|
"versionBehindStr": branchBehindVersion || "0.0.0"
|
||||||
|
});
|
||||||
|
|
||||||
|
assert(bumpType !== "betaPreRelease");
|
||||||
|
|
||||||
|
if( bumpType === "same" ){
|
||||||
|
|
||||||
|
core.warning(`Version on ${branch} and ${branchBehind} are the same, not editing CHANGELOG.md`);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
await gitCommit({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
github_token,
|
||||||
|
"commitAuthorEmail": "actions@github.com",
|
||||||
|
"performChanges": async () => {
|
||||||
|
|
||||||
|
await st.exec(`git checkout ${branch}`);
|
||||||
|
|
||||||
|
const { changelogRaw } = updateChangelog({
|
||||||
|
"changelogRaw":
|
||||||
|
fs.existsSync("CHANGELOG.md") ?
|
||||||
|
fs.readFileSync("CHANGELOG.md")
|
||||||
|
.toString("utf8")
|
||||||
|
: "",
|
||||||
|
"version": branchAheadVersion,
|
||||||
|
bumpType,
|
||||||
|
"body": commits
|
||||||
|
.reverse()
|
||||||
|
.filter(({ commit }) => !exclude_commit_from_author_names.includes(commit.author.name))
|
||||||
|
.map(({ commit }) => commit.message)
|
||||||
|
.filter(message => !/changelog/i.test(message))
|
||||||
|
.filter(message => !/^Merge branch /.test(message))
|
||||||
|
.filter(message => !/^GitBook: /.test(message))
|
||||||
|
.map(message => `- ${message} `)
|
||||||
|
.join("\n")
|
||||||
|
});
|
||||||
|
|
||||||
|
core.debug(`CHANGELOG.md: ${changelogRaw}`);
|
||||||
|
|
||||||
|
fs.writeFileSync(
|
||||||
|
"CHANGELOG.md",
|
||||||
|
Buffer.from(changelogRaw, "utf8")
|
||||||
|
);
|
||||||
|
|
||||||
|
return {
|
||||||
|
"commit": true,
|
||||||
|
"addAll": true,
|
||||||
|
"message": `Update changelog v${branchAheadVersion}`
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateChangelog(
|
||||||
|
params: {
|
||||||
|
changelogRaw: string;
|
||||||
|
version: string;
|
||||||
|
bumpType: "major" | "minor" | "patch";
|
||||||
|
body: string;
|
||||||
|
}
|
||||||
|
): { changelogRaw: string; } {
|
||||||
|
|
||||||
|
const { body, version, bumpType } = params;
|
||||||
|
|
||||||
|
const dateString = (() => {
|
||||||
|
|
||||||
|
const now = new Date();
|
||||||
|
|
||||||
|
return new Date(now.getTime() - (now.getTimezoneOffset() * 60000))
|
||||||
|
.toISOString()
|
||||||
|
.split("T")[0];
|
||||||
|
|
||||||
|
})();
|
||||||
|
|
||||||
|
const changelogRaw = [
|
||||||
|
`${bumpType === "major" ? "#" : (bumpType === "minor" ? "##" : "###")}`,
|
||||||
|
` **${version}** (${dateString}) \n \n`,
|
||||||
|
`${body} \n \n`,
|
||||||
|
params.changelogRaw
|
||||||
|
].join("");
|
||||||
|
|
||||||
|
|
||||||
|
return { changelogRaw };
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
import { describe, it, expect } from "vitest";
|
|
||||||
import { myFunction } from "../src/myFunction";
|
|
||||||
|
|
||||||
describe("Test myFunction", () => {
|
|
||||||
it("Should return the correct value", async () => {
|
|
||||||
expect(myFunction()).toStrictEqual(["a", "b", "c"]);
|
|
||||||
});
|
|
||||||
it("should return the correct number of element", async () => {
|
|
||||||
expect(myFunction().length).toBe(3);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
import { describe, it, expect } from "vitest";
|
|
||||||
import { myObject } from "../src/myObject";
|
|
||||||
|
|
||||||
describe("Test myObject", () => {
|
|
||||||
it("Should have the correct keys", async () => {
|
|
||||||
expect(Object.keys(myObject)).toStrictEqual(["p"]);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
@ -1,24 +1,12 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "CommonJS",
|
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
||||||
"target": "es5",
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
||||||
"moduleResolution": "node",
|
"outDir": "./lib", /* Redirect output structure to the directory. */
|
||||||
"lib": ["es2015", "DOM", "ES2019.Object"],
|
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||||
"esModuleInterop": true,
|
"strict": true, /* Enable all strict type-checking options. */
|
||||||
"declaration": true,
|
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||||
// Do not change or the linking script will stop working
|
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||||
"outDir": "./dist",
|
|
||||||
"sourceMap": true,
|
|
||||||
"newLine": "LF",
|
|
||||||
"noUnusedLocals": true,
|
|
||||||
"noUnusedParameters": true,
|
|
||||||
"incremental": true,
|
|
||||||
"strict": true,
|
|
||||||
"downlevelIteration": true,
|
|
||||||
"jsx": "react-jsx",
|
|
||||||
"noFallthroughCasesInSwitch": true,
|
|
||||||
"skipLibCheck": true
|
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"exclude": ["node_modules", "**/*.test.ts"]
|
||||||
"exclude": ["src/**/*.deno.ts", "src/**/*.deno.tsx"]
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
import { defineConfig } from "vitest/config";
|
|
||||||
|
|
||||||
// ref: https://vitest.dev/config/
|
|
||||||
export default defineConfig({
|
|
||||||
"test": {
|
|
||||||
"watch": false
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue