Open eunjae-lee opened 4 years ago
User could provide a config like the following to allow many use-cases.
// ship.config.js
const coreTeam = ['username1', 'username2', ...];
export default {
commentAfterRelease: ({
id, // issue or pr number,
type, // 'issue' | 'pull-request',
author, // username of the issue or pr
}) => {
return coreMaintainers.indexOf(author) === -1; // notify only if it's coming from community
}
}
// or
export default {
commentAfterRelease: async ({ id }) => {
const labels = await getLabelsFromGitHub(id);
return labels.indexOf("notify after release") >= 0;
}
}
With
commentOnGitHubAfterRelease: true
, at the end ofyarn release:trigger
, Ship.js will go to all the related PRs and leave comments likeThis PR is included in the recent release vx.y.z
.It seems semantic-release does this, too.
example: https://github.com/downshift-js/downshift/pull/971#issuecomment-599040696