mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Compare commits
1
Commits
v2.0.0-next.5
...
v1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a45c4d594a |
Vendored
+18
File diff suppressed because one or more lines are too long
Vendored
+150
File diff suppressed because one or more lines are too long
Vendored
+96
File diff suppressed because one or more lines are too long
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{a as e,c as t,n,o as r,s as i,t as a}from"./github-DTObde6f.js";try{await o()}catch(e){i(e.message)}async function o(){let i=a.payload.pull_request;if(!i)throw Error("This action should only be run on `pull_request_target` or `pull_request` events");let o=e(`github-token`,{required:!0}),c=e(`body`,{required:!0}),l=e(`update-id`),u=l?s(l):null,d=u?`${u}\n\n${c}`:c,f={repo:i.base.repo.name,owner:i.base.repo.owner.login,issue_number:i.number,body:d},p=n(o),m;u&&(r(`Checking for existing comment...`),m=await p.rest.issues.listComments({repo:i.base.repo.name,owner:i.base.repo.owner.login,issue_number:i.number}).then(e=>e.data.find(e=>e.body?.includes(u))?.id)),m?(r(`Updating existing comment (id: ${m})...`),await p.rest.issues.updateComment({...f,comment_id:m}),t(`comment-id`,m)):(r(`Creating new comment...`),t(`comment-id`,(await p.rest.issues.createComment(f)).data.id)),r(`Done!`)}function s(e){let t=`changesets-action-pr-comment`;return t===e?`<!-- ${t} -->`:`<!-- ${t}:${e} -->`}export{};
|
||||
Vendored
+39
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user