This commit is contained in:
xrkffgg
2020-12-21 11:08:10 +08:00
parent be21a57701
commit 38d890766f
4 changed files with 125 additions and 0 deletions

53
.gitignore vendored Normal file
View File

@@ -0,0 +1,53 @@
# @source: https://github.com/xrkffgg/gitignore/blob/master/.gitignore
# production
/dist
/docs-dist
# Log file
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Private
# misc
.DS_Store
# dependencies
node_modules
yarn.lock
package-lock.json
# local env files
.env.local
.env.*.local
# Compiled file
*.class
*.css.map
*.sass.map
*.scss.map
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
~$*.*
# umi
.umi
.umi-production
.umi-test
.env.local
# cache
.sass-cache/
# test
coverage

13
action.yml Normal file
View File

@@ -0,0 +1,13 @@
name: '🤖 Issue Helper'
description: 'Some operations on issue'
author: 'xrkffgg'
branding:
icon: 'message-square'
color: 'blue'
inputs:
github_token:
description: 'github_token'
default: ${{ github.token }}
runs:
using: node12
main: 'dist/index.js'

31
package.json Normal file
View File

@@ -0,0 +1,31 @@
{
"name": "issue-helper",
"version": "0.0.1",
"private": true,
"description": "Some operations on issue.",
"main": "lib/main.js",
"scripts": {
"build": "tsc",
"package": "ncc build --source-map"
},
"author": "xrkffgg",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/actions-cool/issue-helper.git"
},
"keywords": [
"actions",
"issue",
"helper",
"github"
],
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/github": "^4.0.0",
"@octokit/rest": "^18.0.12"
},
"devDependencies": {
"@vercel/ncc": "^0.25.1"
}
}

28
src/main.js Normal file
View File

@@ -0,0 +1,28 @@
const core = require("@actions/core");
const github = require("@actions/github");
const { Octokit } = require('@octokit/rest');
const REACTION_TYPES = [
"+1",
"-1",
"laugh",
"confused",
"heart",
"hooray",
"rocket",
"eyes",
];
async function main() {
try {
const token = core.getInput('token');
const owner = github.context.repo.owner;
const repo = github.context.repo.repo;
console.log(owner, repo)
}
catch (error) {
core.setFailed(error.message);
}
}
main();