···16 </a>
17 </p>
1819- Thank you for your interest in packaging new software in Nixpkgs.
20- Unfortunately, to mitigate the unsustainable growth of unmaintained packages, **Nixpkgs is no longer accepting package requests** via Issues.
2122- As a [volunteer community][community], we are always open to new contributors.
23- If you wish to see this package in Nixpkgs, **we encourage you to [contribute] it yourself, via a Pull Request**.
24- Anyone can [become a package maintainer][maintainers]!
25- You can find language-specific packaging information in the [Nixpkgs Manual][nixpkgs].
26- Should you need any help, please reach out to the community on [Matrix] or [Discourse].
2728 [community]: https://nixos.org/community
29 [contribute]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#quick-start-to-adding-a-package
···16 </a>
17 </p>
1819+ 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.
02021+ 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].
00002223 [community]: https://nixos.org/community
24 [contribute]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#quick-start-to-adding-a-package
···171 return prLabels
172 }
173174+ // Returns true if the issue was closed. In this case, the labeling does not need to
175+ // continue for this issue. Returns false if no action was taken.
176+ async function handleAutoClose(item) {
177+ const issue_number = item.number
178+179+ if (item.labels.some(({ name }) => name === '0.kind: packaging request')) {
180+ const body = [
181+ '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.',
182+ '',
183+ '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].',
184+ '',
185+ '[community]: https://nixos.org/community',
186+ '[contribute]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#quick-start-to-adding-a-package',
187+ '[maintainers]: https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md',
188+ '[nixpkgs]: https://nixos.org/manual/nixpkgs/unstable/',
189+ '[Matrix]: https://matrix.to/#/#dev:nixos.org',
190+ '[Discourse]: https://discourse.nixos.org/c/dev/14',
191+ ].join('\n')
192+193+ core.info(`Issue #${item.number}: auto-closed`)
194+195+ if (!dry) {
196+ await github.rest.issues.createComment({
197+ ...context.repo,
198+ issue_number,
199+ body,
200+ })
201+202+ await github.rest.issues.update({
203+ ...context.repo,
204+ issue_number,
205+ state: 'closed',
206+ state_reason: 'not_planned',
207+ })
208+ }
209+210+ return true
211+ }
212+ return false
213+ }
214+215 async function handle({ item, stats }) {
216 try {
217 const log = (k, v, skip) => {
···231 Object.assign(itemLabels, await handlePullRequest({ item, stats }))
232 } else {
233 stats.issues++
234+ if (item.labels.some(({ name }) => name === '4.workflow: auto-close')) {
235+ // If this returns true, the issue was closed. In this case we return, to not
236+ // label the issue anymore. Most importantly this avoids unlabeling stale issues
237+ // which are closed via auto-close.
238+ if (await handleAutoClose(item)) return
239+ }
240 }
241242 const latest_event_at = new Date(