Skip to content

Conversation

@jamietanna
Copy link
Contributor

@jamietanna jamietanna commented Dec 1, 2025

Changes

As part of #9603, we intended to come back and make sure that all of our
globalOnly configuration fields are set here, so they can be correctly
updated by configuration (in various forms).

As some configuration may not work if we do not set this, we should make
sure that this is applied, as well as ensuring that there is a test to
catch this requirement.

Context

Please select one of the following:

  • This closes an existing Issue, Closes: Add tests for "config/admin.ts" #9603,
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

GPT-4.1

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository:


// HACK
const defined = (GlobalConfig as any).OPTIONS;
console.log(globalOnlyOptions);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
console.log(globalOnlyOptions);

import { getOptions } from './options';

describe('config/global', () => {
it('all', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO

…bal Config

As part of #9603, we intended to come back and make sure that all of our
`globalOnly` configuration fields are set here, so they can be correctly
updated by configuration (in various forms).

As some configuration may not work if we do not set this, we should make
sure that this is applied, as well as ensuring that there is a test to
catch this requirement.
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

This will break renovate, as all thos options are filtered here and are no longer on RepoGlobalConfig

delete result[option];

@jamietanna
Copy link
Contributor Author

OK fair - so this is maybe the inverse? We should be making sure that GlobalConfig.get is used for each of these options, rather than them called as i.e. config.dryRun?

@jamietanna
Copy link
Contributor Author

We should re-review this (when we come round to it) to determine if #24115 has any pointers to things that should (not) be included

@jamietanna jamietanna moved this from Todo to In Progress in Document + clean up types Dec 2, 2025
@jamietanna jamietanna moved this from In Progress to Not ready in Document + clean up types Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Not ready

Development

Successfully merging this pull request may close these issues.

Add tests for "config/admin.ts"

4 participants