From 57cf2183572a58d55048d63bea00a0a0c46ea1ea Mon Sep 17 00:00:00 2001
From: Wolfgang Walther
Date: Fri, 29 Aug 2025 21:02:57 +0200
Subject: [PATCH 1/2] ISSUE_TEMPLATE: revert one-sentence-per-line for
package_request
We tried, but GitHub's markdown renderer will render these newlines
there, so going back to "real" paragraphs.
Also fixed the emphasis slightly, since "via Issues" is not bold, "via a
Pull Request" is also made not bold for consistency. Puts the focus more
on the "contribute" link as well.
---
.github/ISSUE_TEMPLATE/10_package_request.yml | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/10_package_request.yml b/.github/ISSUE_TEMPLATE/10_package_request.yml
index 3f5fb06691b6..e7bff36f7d3c 100644
--- a/.github/ISSUE_TEMPLATE/10_package_request.yml
+++ b/.github/ISSUE_TEMPLATE/10_package_request.yml
@@ -16,14 +16,9 @@ body:
- Thank you for your interest in packaging new software in Nixpkgs.
- Unfortunately, to mitigate the unsustainable growth of unmaintained packages, **Nixpkgs is no longer accepting package requests** via Issues.
+ Thank you for your interest in packaging new software in Nixpkgs. Unfortunately, to mitigate the unsustainable growth of unmaintained packages, **Nixpkgs is no longer accepting package requests** via Issues.
- As a [volunteer community][community], we are always open to new contributors.
- If you wish to see this package in Nixpkgs, **we encourage you to [contribute] it yourself, via a Pull Request**.
- Anyone can [become a package maintainer][maintainers]!
- You can find language-specific packaging information in the [Nixpkgs Manual][nixpkgs].
- Should you need any help, please reach out to the community on [Matrix] or [Discourse].
+ As a [volunteer community][community], we are always open to new contributors. If you wish to see this package in Nixpkgs, **we encourage you to [contribute] it yourself**, via a Pull Request. Anyone can [become a package maintainer][maintainers]! You can find language-specific packaging information in the [Nixpkgs Manual][nixpkgs]. Should you need any help, please reach out to the community on [Matrix] or [Discourse].
[community]: https://nixos.org/community
[contribute]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#quick-start-to-adding-a-package
From b5dee53399e985f074d579dc439c1282ee9cb033 Mon Sep 17 00:00:00 2001
From: Wolfgang Walther
Date: Mon, 18 Aug 2025 15:04:06 +0200
Subject: [PATCH 2/2] ci/github-script/labels: auto close package request
issues
This allows the labels workflow to support issue management in two ways:
- New package request can potentially created with a `4.workflow:
auto-close` label immediately and be closed automatically this way.
- Existing package requests can be bulk-closed by adding this label.
This has the advantage of posting the explanatory comment at the same
time, which is not possible with regular bulk operations.
---
ci/github-script/labels.js | 47 ++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/ci/github-script/labels.js b/ci/github-script/labels.js
index 3086cbaf3844..d50dab436d8a 100644
--- a/ci/github-script/labels.js
+++ b/ci/github-script/labels.js
@@ -171,6 +171,47 @@ module.exports = async ({ github, context, core, dry }) => {
return prLabels
}
+ // Returns true if the issue was closed. In this case, the labeling does not need to
+ // continue for this issue. Returns false if no action was taken.
+ async function handleAutoClose(item) {
+ const issue_number = item.number
+
+ if (item.labels.some(({ name }) => name === '0.kind: packaging request')) {
+ const body = [
+ 'Thank you for your interest in packaging new software in Nixpkgs. Unfortunately, to mitigate the unsustainable growth of unmaintained packages, **Nixpkgs is no longer accepting package requests** via Issues.',
+ '',
+ 'As a [volunteer community][community], we are always open to new contributors. If you wish to see this package in Nixpkgs, **we encourage you to [contribute] it yourself**, via a Pull Request. Anyone can [become a package maintainer][maintainers]! You can find language-specific packaging information in the [Nixpkgs Manual][nixpkgs]. Should you need any help, please reach out to the community on [Matrix] or [Discourse].',
+ '',
+ '[community]: https://nixos.org/community',
+ '[contribute]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#quick-start-to-adding-a-package',
+ '[maintainers]: https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md',
+ '[nixpkgs]: https://nixos.org/manual/nixpkgs/unstable/',
+ '[Matrix]: https://matrix.to/#/#dev:nixos.org',
+ '[Discourse]: https://discourse.nixos.org/c/dev/14',
+ ].join('\n')
+
+ core.info(`Issue #${item.number}: auto-closed`)
+
+ if (!dry) {
+ await github.rest.issues.createComment({
+ ...context.repo,
+ issue_number,
+ body,
+ })
+
+ await github.rest.issues.update({
+ ...context.repo,
+ issue_number,
+ state: 'closed',
+ state_reason: 'not_planned',
+ })
+ }
+
+ return true
+ }
+ return false
+ }
+
async function handle({ item, stats }) {
try {
const log = (k, v, skip) => {
@@ -190,6 +231,12 @@ module.exports = async ({ github, context, core, dry }) => {
Object.assign(itemLabels, await handlePullRequest({ item, stats }))
} else {
stats.issues++
+ if (item.labels.some(({ name }) => name === '4.workflow: auto-close')) {
+ // If this returns true, the issue was closed. In this case we return, to not
+ // label the issue anymore. Most importantly this avoids unlabeling stale issues
+ // which are closed via auto-close.
+ if (await handleAutoClose(item)) return
+ }
}
const latest_event_at = new Date(