Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment on the issues and PRs after release #746

Open
eunjae-lee opened this issue Apr 1, 2020 · 1 comment
Open

Comment on the issues and PRs after release #746

eunjae-lee opened this issue Apr 1, 2020 · 1 comment

Comments

@eunjae-lee
Copy link
Contributor

// ship.js.config
{
  commentOnGitHubAfterRelease: true, // this name is totally temporary
}

With commentOnGitHubAfterRelease: true, at the end of yarn release:trigger, Ship.js will go to all the related PRs and leave comments like This PR is included in the recent release vx.y.z.

It seems semantic-release does this, too.

example: downshift-js/downshift#971 (comment)

@eunjae-lee
Copy link
Contributor Author

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;
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant