mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-08 17:22:26 +03:00
* feat: add ability to prepublish canary versions * fix: ci * fix: pr comment * fix: ci pr * fix: ci pr env * fix: github env name * fix: github file ignoring * fix: yml syntax * fix: codeql * fix: syntax error * fix: pnpm version * fix: remove node 16.x support * fix: workspace name * fix: workspace pnpm * fix: workspace with pnpm * ci: changeset publish * ci: changeset pr name * ci: pr * ci: fix pr.yml * ci: fix pr.yml workspaces * ci: fix steps order in pr.yml * ci: fix pr publish error * ci: fix npm publish tag to alpha * ci: npm publish tag * ci: npm publish tag * ci: fix tag with PR number
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
const config = require('../release.json');
|
||||
const {unlink} = require('fs')
|
||||
|
||||
const commit_message = `v${config.releases[0].newVersion}`
|
||||
|
||||
unlink('./release.json', () => {})
|
||||
|
||||
console.log(commit_message)
|
||||
@@ -0,0 +1,39 @@
|
||||
const dedent = require('dedent');
|
||||
|
||||
module.exports = async function setMessage({
|
||||
header,
|
||||
body,
|
||||
prNumber,
|
||||
repo,
|
||||
github,
|
||||
}) {
|
||||
const commentList = await github.paginate(
|
||||
'GET /repos/:owner/:repo/issues/:issue_number/comments',
|
||||
{
|
||||
...repo,
|
||||
issue_number: prNumber,
|
||||
},
|
||||
);
|
||||
|
||||
const commentBody = dedent`
|
||||
${header}
|
||||
|
||||
${body}
|
||||
`;
|
||||
|
||||
const comment = commentList.find((comment) => comment.body.startsWith(header));
|
||||
|
||||
if (!comment) {
|
||||
await github.rest.issues.createComment({
|
||||
...repo,
|
||||
issue_number: prNumber,
|
||||
body: commentBody,
|
||||
});
|
||||
} else {
|
||||
await github.rest.issues.updateComment({
|
||||
...repo,
|
||||
comment_id: comment.id,
|
||||
body: commentBody,
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user