ci/github-script/merge: improve wording
This commit is contained in:
@@ -43,7 +43,7 @@ These issues effectively list PRs the merge bot has interacted with.
|
|||||||
To ensure security and a focused utility, the bot adheres to specific limitations:
|
To ensure security and a focused utility, the bot adheres to specific limitations:
|
||||||
|
|
||||||
- The PR targets `master`, `staging`, or `staging-next`.
|
- The PR targets `master`, `staging`, or `staging-next`.
|
||||||
- The PR only touches files located under `pkgs/by-name/*`.
|
- The PR only touches packages located under `pkgs/by-name/*`.
|
||||||
- The PR is authored by [@r-ryantm](https://nix-community.github.io/nixpkgs-update/r-ryantm/) or a [committer][@NixOS/nixpkgs-committers].
|
- The PR is authored by [@r-ryantm](https://nix-community.github.io/nixpkgs-update/r-ryantm/) or a [committer][@NixOS/nixpkgs-committers].
|
||||||
- The user attempting to merge is a member of [@NixOS/nixpkgs-maintainers].
|
- The user attempting to merge is a member of [@NixOS/nixpkgs-maintainers].
|
||||||
- The user attempting to merge is a maintainer of all packages touched by the PR.
|
- The user attempting to merge is a maintainer of all packages touched by the PR.
|
||||||
|
|||||||
@@ -27,14 +27,16 @@ function runChecklist({
|
|||||||
'staging',
|
'staging',
|
||||||
'staging-next',
|
'staging-next',
|
||||||
].includes(pull_request.base.ref),
|
].includes(pull_request.base.ref),
|
||||||
'PR touches only files in `pkgs/by-name/`.': allByName,
|
'PR touches only packages in `pkgs/by-name/`.': allByName,
|
||||||
'PR authored by r-ryantm or committer.':
|
'PR authored by r-ryantm or committer.':
|
||||||
pull_request.user.login === 'r-ryantm' ||
|
pull_request.user.login === 'r-ryantm' ||
|
||||||
committers.has(pull_request.user.id),
|
committers.has(pull_request.user.id),
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
checklist[`${user.login} can use the merge bot.`] = userIsMaintainer
|
checklist[
|
||||||
|
`${user.login} is a member of [@NixOS/nixpkgs-maintainers](https://github.com/orgs/NixOS/teams/nixpkgs-maintainers).`
|
||||||
|
] = userIsMaintainer
|
||||||
if (allByName) {
|
if (allByName) {
|
||||||
// We can only determine the below, if all packages are in by-name, since
|
// We can only determine the below, if all packages are in by-name, since
|
||||||
// we can't reliably relate changed files to packages outside by-name.
|
// we can't reliably relate changed files to packages outside by-name.
|
||||||
@@ -249,8 +251,9 @@ async function handleMerge({
|
|||||||
|
|
||||||
const body = [
|
const body = [
|
||||||
`<!-- comment: ${comment.node_id} -->`,
|
`<!-- comment: ${comment.node_id} -->`,
|
||||||
|
`@${comment.user.login} wants to merge this PR.`,
|
||||||
'',
|
'',
|
||||||
'Requirements to merge this PR:',
|
'Requirements to merge this PR with `@NixOS/nixpkgs-merge-bot merge`:',
|
||||||
...Object.entries(checklist).map(
|
...Object.entries(checklist).map(
|
||||||
([msg, res]) => `- :${res ? 'white_check_mark' : 'x'}: ${msg}`,
|
([msg, res]) => `- :${res ? 'white_check_mark' : 'x'}: ${msg}`,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user