mirror of
https://github.com/hernikplays/freelo-action.git
synced 2024-11-10 02:38:06 +01:00
chore: reduce lines by using content of context.repo
This commit is contained in:
parent
9c54baee5e
commit
4e1da0d79a
2 changed files with 4 additions and 8 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -45388,8 +45388,7 @@ try {
|
|||
}
|
||||
octokit.rest.issues.createComment({
|
||||
issue_number: issue.number,
|
||||
owner: github.context.payload.repository?.owner.login ?? "",
|
||||
repo: github.context.payload.repository?.name ?? "",
|
||||
...github.context.repo,
|
||||
body: `Freelo task assigned: <a href="https://app.freelo.io/task/${res.data.id}">${res.data.id}</a><br>Please do not edit or delete this comment as it is used to prevent duplication of tasks.`
|
||||
});
|
||||
break;
|
||||
|
@ -45398,8 +45397,7 @@ try {
|
|||
break;
|
||||
case "closed": {
|
||||
const comment2 = (await octokit.rest.issues.listComments({
|
||||
owner: github.context.payload.repository?.owner.login ?? "",
|
||||
repo: github.context.payload.repository?.name ?? "",
|
||||
...github.context.repo,
|
||||
issue_number: issue.number,
|
||||
mediaType: {
|
||||
format: "html"
|
||||
|
|
|
@ -114,8 +114,7 @@ try {
|
|||
// create an issue comment so we can track if the task has been already created
|
||||
octokit.rest.issues.createComment({
|
||||
issue_number: issue.number,
|
||||
owner: context.payload.repository?.owner.login ?? "",
|
||||
repo: context.payload.repository?.name ?? "",
|
||||
...context.repo,
|
||||
body: `Freelo task assigned: <a href="https://app.freelo.io/task/${res.data.id}">${res.data.id}</a><br>Please do not edit or delete this comment as it is used to prevent duplication of tasks.`,
|
||||
});
|
||||
break;
|
||||
|
@ -127,8 +126,7 @@ try {
|
|||
// Get comments and find the related Freelo task ID
|
||||
const comment = (
|
||||
await octokit.rest.issues.listComments({
|
||||
owner: context.payload.repository?.owner.login ?? "",
|
||||
repo: context.payload.repository?.name ?? "",
|
||||
...context.repo,
|
||||
issue_number: issue.number,
|
||||
mediaType: {
|
||||
format: "html",
|
||||
|
|
Loading…
Reference in a new issue