Skip to content

Commit

Permalink
Message only opened PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Dec 12, 2024
1 parent 8f01da6 commit 318d9db
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/plugins/newDefaultOpened.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,20 @@ export default async (app: App, payload: PullPayload): Promise<void> => {

const newTitle = `Adds new ${repoCategory} [${owner}/${repo}]`

if (payload.action === 'opened' || newTitle !== payload.pull_request.title) {
await app.octokit.rest.issues.update({
if (payload.action === 'opened') {
if (newTitle !== payload.pull_request.title) {
await app.octokit.rest.issues.update({
...extractOwnerRepo(payload),
issue_number: payload.pull_request.number,
title: newTitle,
})
}
await app.octokit.rest.issues.createComment({
...extractOwnerRepo(payload),
issue_number: payload.pull_request.number,
title: newTitle,
body: postedComment,
})
}
await app.octokit.rest.issues.createComment({
...extractOwnerRepo(payload),
issue_number: payload.pull_request.number,
body: postedComment,
})
}

async function getChangedFiles(
Expand Down

0 comments on commit 318d9db

Please sign in to comment.