mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
feat: support default issueNumber get from context (#81)
This commit is contained in:
@@ -64,10 +64,13 @@ const ALLACTIONS = [
|
||||
// **************************************************************************
|
||||
async function main() {
|
||||
try {
|
||||
const owner = github.context.repo.owner;
|
||||
const repo = github.context.repo.repo;
|
||||
const ctx = github.context;
|
||||
const { owner, repo } = ctx.repo;
|
||||
|
||||
const issueNumber = core.getInput('issue-number');
|
||||
let defaultNo;
|
||||
if (ctx.eventName === 'issues') defaultNo = ctx.payload.issue.number;
|
||||
|
||||
const issueNumber = core.getInput('issue-number') || defaultNo;
|
||||
const commentId = core.getInput('comment-id');
|
||||
|
||||
const defaultBody = `Currently at ${owner}/${repo}. And this is default comment.`;
|
||||
|
Reference in New Issue
Block a user