mirror of
https://github.com/hernikplays/freelo-action.git
synced 2024-11-25 00:51:05 +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({
|
octokit.rest.issues.createComment({
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
owner: github.context.payload.repository?.owner.login ?? "",
|
...github.context.repo,
|
||||||
repo: github.context.payload.repository?.name ?? "",
|
|
||||||
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.`
|
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;
|
break;
|
||||||
|
@ -45398,8 +45397,7 @@ try {
|
||||||
break;
|
break;
|
||||||
case "closed": {
|
case "closed": {
|
||||||
const comment2 = (await octokit.rest.issues.listComments({
|
const comment2 = (await octokit.rest.issues.listComments({
|
||||||
owner: github.context.payload.repository?.owner.login ?? "",
|
...github.context.repo,
|
||||||
repo: github.context.payload.repository?.name ?? "",
|
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
mediaType: {
|
mediaType: {
|
||||||
format: "html"
|
format: "html"
|
||||||
|
|
|
@ -114,8 +114,7 @@ try {
|
||||||
// create an issue comment so we can track if the task has been already created
|
// create an issue comment so we can track if the task has been already created
|
||||||
octokit.rest.issues.createComment({
|
octokit.rest.issues.createComment({
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
owner: context.payload.repository?.owner.login ?? "",
|
...context.repo,
|
||||||
repo: context.payload.repository?.name ?? "",
|
|
||||||
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.`,
|
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;
|
break;
|
||||||
|
@ -127,8 +126,7 @@ try {
|
||||||
// Get comments and find the related Freelo task ID
|
// Get comments and find the related Freelo task ID
|
||||||
const comment = (
|
const comment = (
|
||||||
await octokit.rest.issues.listComments({
|
await octokit.rest.issues.listComments({
|
||||||
owner: context.payload.repository?.owner.login ?? "",
|
...context.repo,
|
||||||
repo: context.payload.repository?.name ?? "",
|
|
||||||
issue_number: issue.number,
|
issue_number: issue.number,
|
||||||
mediaType: {
|
mediaType: {
|
||||||
format: "html",
|
format: "html",
|
||||||
|
|
Loading…
Reference in a new issue