mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 10:15:59 +08:00
feat: support custom repo (#83)
This commit is contained in:
@@ -13,6 +13,9 @@ inputs:
|
||||
token:
|
||||
description: 'Github_token'
|
||||
default: ${{ github.token }}
|
||||
repo:
|
||||
description: 'The repositorie'
|
||||
|
||||
issue-number:
|
||||
description: 'Issue-number'
|
||||
comment-id:
|
||||
|
11
src/main.js
11
src/main.js
@@ -65,7 +65,16 @@ const ALLACTIONS = [
|
||||
async function main() {
|
||||
try {
|
||||
const ctx = github.context;
|
||||
const { owner, repo } = ctx.repo;
|
||||
|
||||
// No display to outside
|
||||
let owner, repo;
|
||||
if (core.getInput('repo')) {
|
||||
owner = core.getInput('repo').split('/')[0];
|
||||
repo = core.getInput('repo').split('/')[1];
|
||||
} else {
|
||||
owner = ctx.repo.owner;
|
||||
repo = ctx.repo.repo;
|
||||
}
|
||||
|
||||
let defaultNo;
|
||||
if (ctx.eventName === 'issues') defaultNo = ctx.payload.issue.number;
|
||||
|
Reference in New Issue
Block a user