Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions ci/github-script/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,16 @@ module.exports = async ({ github, context, core, dry }) => {

if (baseClassification.type.includes('channel')) {
const { stable, version } = baseClassification
const correctBranch = stable ? `release-${version}` : 'master'

let releaseStable = `release-*`
if (stable) {
releaseStable = `release-${version}`
}

const body = [
'The `nixos-*` and `nixpkgs-*` branches are pushed to by the channel release script and should not be merged into directly.',
'',
`Please target \`${correctBranch}\` instead.`,
`Make sure you know the [right base branch for your changes](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#branch-conventions), then target \`${releaseStable}\` or \`master\` instead.`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess these PRs could be supposed to go to a staging branch, probably would be best to allow for that?

Suggested change
`Make sure you know the [right base branch for your changes](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#branch-conventions), then target \`${releaseStable}\` or \`master\` instead.`,
`Make sure you know the [right base branch for your changes](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#branch-conventions), then target the correct branch (probably \`${releaseStable}\` or \`master\`) instead.`,

].join('\n')

await postReview({ github, context, core, dry, body, reviewKey })
Expand Down
Loading