chore: reduce lines by using content of context.repo

This commit is contained in:
Matyáš Caras 2024-07-30 17:30:31 +02:00
parent 9c54baee5e
commit 4e1da0d79a
Signed by: hernik
GPG key ID: 2A3175F98820C5C6
2 changed files with 4 additions and 8 deletions

6
dist/index.js vendored
View file

@ -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"

View file

@ -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",