Yadhav/fix recent issues - #990
Open
decyjphr wants to merge 109 commits into
Open
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Introduced a new "disable_plugins" property in the settings schema to allow disabling specific plugins at various configuration layers. - Each entry can be a plugin name or an object specifying the plugin and its target layer (self, children, all). - Updated smoke-test.js to include interactive mode for manual validation during test phases. - Implemented new test cases for the disable_plugins feature, covering normalization, strip map computation, and integration with updateOrg and updateRepos functions. - Added tests to ensure proper handling of valid and invalid disable_plugins configurations.
…nds survive Without action.msg in the dedup key, multiple disable_plugins NopCommands for the same repo (e.g. skipping 'labels' AND 'teams') all share the same type+repo+plugin+endpoint key and only the first one survives, silently dropping the rest from the PR comment and check-run output. Adding action.msg to the key ensures each unique informational message is retained while still deduplicating exact duplicates. Also adds test 27 to cover this case.
- Introduced `additive_plugins` configuration to allow specific Diffable plugins to run in additive mode, preserving existing entries on GitHub. - Updated `normalizeAdditivePlugins` method to validate and return a set of valid plugin names for additive mode. - Modified `childPluginsList` to include section names for better tracking of additive flags. - Enhanced existing tests to cover new functionality, ensuring proper behavior of plugins in additive mode. - Added integration tests to verify that plugins behave correctly when configured with additive_plugins. - Created a new environment file for webhook proxy configuration.
…roles permissions
- Removed unnecessary comments and streamlined the constructor to enforce uppercase variable names. - Simplified the `find` method to directly return the required variable data. - Updated the `changed` method to directly compare values without additional sorting logic. - Refactored `update`, `add`, and `remove` methods to return NopCommand instances when `nop` is true, preventing actual API calls. - Enhanced unit tests to cover new NopCommand behavior and ensure proper functionality of the Variables plugin. - Introduced phase 13 in smoke tests to validate variable creation, updating, and removal in repository settings. - Added support for phase filtering in smoke tests to allow targeted execution of specific phases.
…AML configurations
Generate safe-settings YAML from existing GitHub configuration for a repo, org, or custom-property-based suborg. - lib/settingsGenerator.js: extraction engine reusing each plugin's find() to read current state and produce config/YAML, with cross-repo intersection for suborg generation. - generate-settings.js: standalone CLI that writes generated YAML to the local filesystem (.sample.yml unless --overwrite); loads .env manually. - index.js + app.yml: repository_dispatch (safe-settings-generate) handler that always opens a PR against the admin repo (never commits to the default branch directly). - Suborg files are named suborgs/<name>_<value>.yml. - README: document generator usage and the PR-only guarantee. - Unit tests for the generator (25 tests).
- Added support for custom repository roles in smoke-test.js, including creation, deletion, and retrieval functions. - Implemented new ruleset management functions for organizations and repositories. - Updated smoke tests to validate the behavior of custom repository roles and rulesets under various scenarios. - Enhanced existing tests to ensure proper handling of additive and disabled plugins for custom repository roles and rulesets. - Introduced new test cases to cover scenarios where suborg configurations change and their impact on repository rulesets. - Improved error handling and logging for better traceability during tests.
…_reviewers drift detection
… object array key reordering
When a suborg.yml file changes its targeting rules (suborgrepos, suborgteams, or suborgproperties), repos that no longer match the updated targeting were not having their suborg-applied settings (e.g. rulesets) removed. This happened because getSubOrgConfigs() only resolves the new targeting, and repos not in the new targeting were skipped in updateRepos(). Fix: Load the previous version of changed suborg config files from the base ref (payload.before for push events, pull_request.base.ref for PR/NOP mode), resolve which repos were previously targeted, compare with current targeting, and process removed repos so diffable's sync() detects and removes orphaned rulesets. Changes: - index.js: Pass payload.after/payload.before as ref/baseRef to syncSelectedSettings in push handler - lib/settings.js: Add getReposRemovedFromSubOrgTargeting() method that compares old vs new targeting to find removed repos - lib/settings.js: Add loadYamlFromRef() helper to load config from a specific git ref without cache interference - lib/settings.js: Update syncSelectedRepos to accept baseRef, identify removed repos, and process them before the suborg loop - test/unit/lib/settings.test.js: Add tests for targeting removal Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds a sub-test to phase 5 that narrows suborg targeting from suborgteams to suborgrepos (excluding demo-repo-service1), then verifies the suborg ruleset is removed from the dropped repo while retained on the still-targeted repo. Restores team-targeted config afterward for subsequent phases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The plugin was updated to use github.rest.repos.* but the test was still mocking github.repos.*, causing TypeError failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…overy failure When security-manager discovery fails, remove() sets skipTeamDeletion and returned a bare Promise.resolve() even in nop mode. Diffable.sync() pushed that undefined into the nop command list, hiding the fact that a deletion was intentionally skipped. Return an INFO NopCommand in nop mode so the dry-run output is accurate and no undefined entries accumulate. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 64c2ef45-ed6c-4756-9ec6-58a35797dc0e
…r-1010-security-manager Modernize security manager team handling (incorporate PR #1010)
…ation appId harness Incorporate PR #1017 (absent from this branch), adapted to this branch's `this.github.repos` convention: - Branch-protection diff message read `params.branch.name` (always undefined, since `params.branch` is already the branch string) -> use `params.branch`, and JSON.stringify the results in the debug log. - NOP update path (protection already exists) was mislabeled 'Add Branch Protection' -> 'Update Branch Protection' (debug 'Updating'); the 404/add path keeps its 'Add' label. - Add NOP-mode unit tests asserting the update label when protection exists, the add label on 404, and that the diff message names the real branch. Integration harness: `createProbot` in probot 13 only reads overrides/defaults/env, so the old `{ id, cert, githubToken }` args were dropped, making @octokit/auth-app throw "appId option is required". Pass dummy credentials via `overrides` (token auth) and stub the startup `/app/installations` call so the app loads under nock.disableNetConnect(). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c735bbe7-feb9-472f-827c-d56ddfe7fe6a
…are-pr-1017 fix(branches): incorporate PR #1017 log/label fixes + mitigate integration appId harness
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
A ruleset POST is not idempotent. When Octokit retries a create that already succeeded, or a repo is processed by two overlapping syncs (full sync racing with repository.created), the second create fails with 422 'Name must be unique'. Reconcile by looking the existing ruleset up by name and updating it in place. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…rporate-pr-1018-nop-results fix: full-sync NOP results without check run + idempotent ruleset create
…rate PR #1023) (#1048) Diffable.sync() now calls an optional resolveOverrides(existingRecords, filteredEntries) hook after find() and before the comparison. The rulesets plugin implements it: each config entry is matched to its live record (via comparator) and passed through Overrides.removeOverrides, so {{EXTERNALLY_DEFINED}} placeholders resolve to the live values before changed() ever sees them. This mirrors how branches.js resolves overrides inside compareDeep. Behavior change (intentional, fixes #1022): a ruleset whose only difference from GitHub is the placeholder no longer reports "Update Ruleset" in dry runs and no longer issues a redundant PUT in apply mode. Rulesets with real differences behave exactly as before. Entries are cloned (structuredClone) before resolution since removeOverrides mutates its input. Tests updated to the new behavior and nop-mode coverage added. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR significantly expands safe-settings capabilities by adding enterprise app-installation management, a “reverse” settings generator, and multiple plugin-behavior enhancements (disable/additive plugins, teams external group linking, ruleset name→id aliasing), backed by broad unit/integration test additions and schema/docs updates.
Changes:
- Add new app-installations management flow (enterprise-auth client, delta/full reconciliation, reporting subject support).
- Add settings generation tooling (
SettingsGenerator, CLI + repository_dispatch handler) and repo-selection utilities. - Improve diff/sync behavior (additive mode, ruleset/teams/variables/custom properties updates) and update schema/docs accordingly.
Show a summary per file
| File | Description |
|---|---|
| test/unit/lib/settingsGenerator.test.js | New unit tests for SettingsGenerator helpers and output paths. |
| test/unit/lib/repoSelector.test.js | New unit tests for resolving repos via names/teams/properties/all. |
| test/unit/lib/plugins/variables.test.js | Expanded Variables plugin test coverage incl. nop behavior. |
| test/unit/lib/plugins/teams.test.js | Expanded Teams plugin tests for security-manager and external_group logic. |
| test/unit/lib/plugins/custom_properties.test.js | Update tests to use github.rest.repos custom properties APIs. |
| test/unit/lib/plugins/branches.test.js | Add nop-mode regression coverage for branch protection messaging. |
| test/unit/lib/plugins/appInstallations.test.js | New tests for app installation delta/full sync + additive/nop behavior. |
| test/unit/lib/mergeDeep.test.js | New regression tests for ruleset/array identity and string-assign bug fix. |
| test/unit/lib/appOctokitClient.test.js | New tests for enterprise org installations client batching/toggles. |
| test/integration/plugins/teams.test.js | Extend integration test to cover security-manager role/team filtering. |
| test/integration/common.js | Fix Probot init for newer API and stub startup installation listing. |
| script/build-schema | Augment dereferenced schema with ruleset name/slug aliases. |
| schema/settings.json | Expand schema: teams include/exclude/external_group, new plugins/keys. |
| package.json | Add smoke-test npm scripts. |
| package-lock.json | Dependency lock updates (e.g., js-yaml, shell-quote). |
| lib/settingsGenerator.js | New SettingsGenerator to emit YAML from live GitHub state. |
| lib/repoSelector.js | New RepoSelector helper for fixed repo selection criteria. |
| lib/plugins/variables.js | Refactor Variables plugin: deterministic comparisons, nop commands. |
| lib/plugins/teams.js | Add external_group linking + updated security-manager handling. |
| lib/plugins/rulesets.js | Add name→id resolution + override placeholder resolution + idempotent create. |
| lib/plugins/repository.js | Add change signals for suborg re-evaluation (hasChanges/renamed/created). |
| lib/plugins/diffable.js | Add additive mode + per-plugin hasChanges signal + override resolution hook. |
| lib/plugins/custom_repository_roles.js | New plugin to manage custom repository roles at org level. |
| lib/plugins/custom_properties.js | Normalize entries robustly and switch to github.rest.repos APIs. |
| lib/plugins/branches.js | Fix nop messaging/logging for branch protection updates. |
| lib/plugins/appInstallations.js | New org-scoped plugin to manage GitHub App installation repo access. |
| lib/nopcommand.js | Extend NopCommand with subject/subjectType overload for reporting. |
| lib/mergeDeep.js | Improve identity/diffing: stable stringify fallback, bypass actor id quirks, parameters deletions. |
| lib/configManager.js | Stop swallowing getContent errors; rely on outer error handling. |
| lib/commentmessage.js | Replace legacy per-repo table with richer summarized check-run output. |
| lib/appOctokitClient.js | New enterprise-level Octokit wrapper for org installation endpoints. |
| index.js | Major sync refactor: enterprise context enrichment, selected sync dedupe, PR file detection changes, generator PR flow, installation_target handler. |
| generate-settings.js | New standalone CLI to generate YAML to local filesystem. |
| docs/sample-settings/suborg.yml | Document disable_plugins at suborg layer. |
| docs/sample-settings/settings.yml | Document disable_plugins/additive_plugins + ruleset name/slug aliases. |
| docs/sample-settings/sample-deployment-settings.yml | Document deployment-layer disable_plugins. |
| docs/README.md | Link to root README disable_plugins documentation. |
| docs/github-settings/4. teams.md | Document external_group/include/exclude semantics for teams. |
| docs/deploy.md | Note custom org roles permission requirement. |
| docs/adr/README.md | New ADR index. |
| docs/adr/0001-app-installation-plugin.md | New ADR describing app_installations design and rationale. |
| app.yml | Add repository_dispatch event + permissions for new features/APIs. |
| .gitignore | Ignore all *.env files. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Suppressed comments (1)
lib/plugins/teams.js:358
- The idempotency GET for current external-group links also uses
team_slug: attrs.name, which will not match when config uses a team display name. This can cause the PATCH to run every time (or fail) even when the team is already linked.
const current = await this.github.request(`GET ${teamExternalGroupsEndpoint}`, {
org: this.repo.owner,
team_slug: attrs.name
})
- Files reviewed: 46/50 changed files
- Comments generated: 5
- Review effort level: Lite
* Handle multiple config changes in a PR or Push event and process them as a batch (#888) * handle multiple changes as a batch * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * depup files in a push * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * moved the dedup logic * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * build(deps): bump undici from 7.7.0 to 7.16.0 (#881) Bumps [undici](https://github.com/nodejs/undici) from 7.7.0 to 7.16.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.7.0...v7.16.0) --- updated-dependencies: - dependency-name: undici dependency-version: 7.16.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump node-cron from 3.0.3 to 4.2.1 (#865) Bumps [node-cron](https://github.com/merencia/node-cron) from 3.0.3 to 4.2.1. - [Release notes](https://github.com/merencia/node-cron/releases) - [Commits](node-cron/node-cron@v3.0.3...v4.2.1) --- updated-dependencies: - dependency-name: node-cron dependency-version: 4.2.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump @apidevtools/json-schema-ref-parser (#882) Bumps [@apidevtools/json-schema-ref-parser](https://github.com/APIDevTools/json-schema-ref-parser) from 12.0.2 to 14.2.1. - [Release notes](https://github.com/APIDevTools/json-schema-ref-parser/releases) - [Commits](APIDevTools/json-schema-ref-parser@v12.0.2...v14.2.1) --- updated-dependencies: - dependency-name: "@apidevtools/json-schema-ref-parser" dependency-version: 14.2.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump minimatch from 10.0.1 to 10.0.3 (#883) Bumps [minimatch](https://github.com/isaacs/minimatch) from 10.0.1 to 10.0.3. - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v10.0.1...v10.0.3) --- updated-dependencies: - dependency-name: minimatch dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps-dev): bump eslint-plugin-import from 2.31.0 to 2.32.0 (#884) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.31.0 to 2.32.0. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](import-js/eslint-plugin-import@v2.31.0...v2.32.0) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-version: 2.32.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump docker/login-action from 3.5.0 to 3.6.0 (#885) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@184bdaa...5e57cd1) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 3.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump actions/setup-node from 4 to 6 (#890) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v4...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump js-yaml in the npm_and_yarn group across 1 directory (#894) Bumps the npm_and_yarn group with 1 update in the / directory: [js-yaml](https://github.com/nodeca/js-yaml). Updates `js-yaml` from 4.1.0 to 4.1.1 - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.1.0...4.1.1) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.1.1 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump docker/metadata-action from 5.8.0 to 5.10.0 (#897) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.8.0 to 5.10.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](docker/metadata-action@c1e5197...c299e40) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-version: 5.10.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump actions/checkout from 4 to 6 (#898) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ci(deps): bump docker/setup-qemu-action from 3.6.0 to 3.7.0 (#899) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.6.0 to 3.7.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](docker/setup-qemu-action@2910929...c7c5346) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-version: 3.7.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump the npm_and_yarn group across 1 directory with 2 updates (#904) Bumps the npm_and_yarn group with 2 updates in the / directory: [jws](https://github.com/brianloveswords/node-jws) and [validator](https://github.com/validatorjs/validator.js). Updates `jws` from 3.2.2 to 3.2.3 - [Release notes](https://github.com/brianloveswords/node-jws/releases) - [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md) - [Commits](auth0/node-jws@v3.2.2...v3.2.3) Updates `validator` from 13.11.0 to 13.15.26 - [Release notes](https://github.com/validatorjs/validator.js/releases) - [Changelog](https://github.com/validatorjs/validator.js/blob/master/CHANGELOG.md) - [Commits](validatorjs/validator.js@13.11.0...13.15.26) --- updated-dependencies: - dependency-name: jws dependency-version: 3.2.3 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: validator dependency-version: 13.15.26 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump qs in the npm_and_yarn group across 1 directory (#912) Bumps the npm_and_yarn group with 1 update in the / directory: [qs](https://github.com/ljharb/qs). Updates `qs` from 6.13.0 to 6.14.1 - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.13.0...v6.14.1) --- updated-dependencies: - dependency-name: qs dependency-version: 6.14.1 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump qs in the npm_and_yarn group across 1 directory (#913) Bumps the npm_and_yarn group with 1 update in the / directory: [qs](https://github.com/ljharb/qs). Updates `qs` from 6.13.0 to 6.14.1 - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.13.0...v6.14.1) --- updated-dependencies: - dependency-name: qs dependency-version: 6.14.1 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump octokit from 5.0.3 to 5.0.5 (#905) Bumps [octokit](https://github.com/octokit/octokit.js) from 5.0.3 to 5.0.5. - [Release notes](https://github.com/octokit/octokit.js/releases) - [Commits](octokit/octokit.js@v5.0.3...v5.0.5) --- updated-dependencies: - dependency-name: octokit dependency-version: 5.0.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump smee-client from 4.3.1 to 5.0.0 (#906) Bumps [smee-client](https://github.com/probot/smee-client) from 4.3.1 to 5.0.0. - [Release notes](https://github.com/probot/smee-client/releases) - [Commits](probot/smee-client@v4.3.1...v5.0.0) --- updated-dependencies: - dependency-name: smee-client dependency-version: 5.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps-dev): bump @eslint/eslintrc from 3.3.1 to 3.3.3 (#908) Bumps [@eslint/eslintrc](https://github.com/eslint/eslintrc) from 3.3.1 to 3.3.3. - [Release notes](https://github.com/eslint/eslintrc/releases) - [Changelog](https://github.com/eslint/eslintrc/blob/main/CHANGELOG.md) - [Commits](eslint/eslintrc@v3.3.1...eslintrc-v3.3.3) --- updated-dependencies: - dependency-name: "@eslint/eslintrc" dependency-version: 3.3.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump docker/setup-buildx-action from 3.11.1 to 3.12.0 (#909) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.11.1 to 3.12.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](docker/setup-buildx-action@e468171...8d2750c) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-version: 3.12.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump undici in the npm_and_yarn group across 1 directory (#921) Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici). Updates `undici` from 7.16.0 to 7.18.2 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.16.0...v7.18.2) --- updated-dependencies: - dependency-name: undici dependency-version: 7.18.2 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump docker/login-action from 3.6.0 to 3.7.0 (#924) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.6.0 to 3.7.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@5e57cd1...c94ce9f) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 3.7.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump the npm_and_yarn group across 1 directory with 2 updates (#927) Bumps the npm_and_yarn group with 2 updates in the / directory: [lodash](https://github.com/lodash/lodash) and @isaacs/brace-expansion. Updates `lodash` from 4.17.21 to 4.17.23 - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.21...4.17.23) Updates `@isaacs/brace-expansion` from 5.0.0 to 5.0.1 --- updated-dependencies: - dependency-name: lodash dependency-version: 4.17.23 dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: "@isaacs/brace-expansion" dependency-version: 5.0.1 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [WIP] Upgrade project to support Node.js 22 and 24 (#939) * Initial plan * Upgrade Node.js to 22 and 24 (last 2 LTS versions) Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Fix Dependabot CI: correct actor check from `dependabot` to `dependabot[bot]` (#940) * Initial plan * Initial plan for fixing CI workflow test Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Fix Dependabot actor check in node-ci.yml workflow The `if` condition used `'dependabot'` but Dependabot's actual GitHub actor username is `'dependabot[bot]'`. This caused the test job to run for Dependabot PRs when it should be skipped, resulting in npm install failures due to ESLint 10 peer dependency conflicts. Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Refactor advanced CodeQL workflow steps (#941) * Added support for proxy servers in all execution environments (#917) * Added support for proxy servers in all execution environments * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * build(deps): bump probot from 13.4.4 to 14.2.4 (#907) * build(deps): bump probot from 13.4.4 to 14.2.4 Bumps [probot](https://github.com/probot/probot) from 13.4.4 to 14.2.4. - [Release notes](https://github.com/probot/probot/releases) - [Commits](probot/probot@v13.4.4...v14.2.4) --- updated-dependencies: - dependency-name: probot dependency-version: 14.2.4 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Fix test suite failures caused by ESM-only `@octokit/core` and `probot` dependencies (#938) * Initial plan * Initial plan for fixing failing test suites Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Fix failing test suites caused by ESM-only dependencies Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Update minimatch dependency version to 10.2.1 * Fix devcontainer configuration and update dependencies (#942) * fix devcontainer * Update .devcontainer/Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .devcontainer/Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .devcontainer/devcontainer.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: prevent race conditions by creating new objects for repository configurations (#943) * fix: prevent race conditions by creating new objects for repository configurations Signed-off-by: Jan Bronicki <janbronicki@microsoft.com> * Update lib/plugins/repository.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: Jan Bronicki <janbronicki@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Change helm defaults to be more newcomer friendly (#919) * Updated container port to match the port exposed by the application inside the container * Added examples for common environment variables * Changed validators to be examples in comments to avoid needing to override * Changed min replica count to 1 for more cost effective defaults * Updated min replica default in docs * Updated service port default in docs * Updated validator defaults in docs * Updated restricted repos include default in docs * Update helm/safe-settings/values.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update helm/safe-settings/values.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Updated README to match the new default value Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: add HOST=0.0.0.0 env to Dockerfile for probot v14 compatibility (#948) Agent-Logs-Url: https://github.com/github/safe-settings/sessions/6a4f5799-ea1f-4900-a659-b492dbdf5cfc Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * fix: migrate all octokit API calls to .rest namespace for probot v14 compatibility (#949) * fix: override NODE_ENV=development in functional test and add retry logic Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/safe-settings/sessions/97b10121-f26e-44c0-86e6-3ede047fe176 * fix: add --fail to curl and || true to docker logs in functional test Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/safe-settings/sessions/97b10121-f26e-44c0-86e6-3ede047fe176 * fix: migrate all octokit API calls to .rest namespace for probot v14 compatibility and revert Dockerfile ENV HOST Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/safe-settings/sessions/179c9d77-8ca0-4098-9017-8a255df170f9 * Update lib/plugins/repository.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: address review feedback - NopCommand repo arg, milestones mock, teams test error propagation Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/safe-settings/sessions/d9420b15-2cca-40a3-a30b-869df73487f1 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add HOST environment variable to Dockerfile (#950) * docs: add troubleshooting section for Docker build and runtime issues (#951) * build(deps): bump undici in the npm_and_yarn group across 1 directory (#947) Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici). Updates `undici` from 7.22.0 to 7.24.1 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.22.0...v7.24.1) --- updated-dependencies: - dependency-name: undici dependency-version: 7.24.1 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps-dev): bump brace-expansion Bumps the npm_and_yarn group with 1 update in the / directory: [brace-expansion](https://github.com/juliangruber/brace-expansion). Updates `brace-expansion` from 1.1.12 to 1.1.13 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v1.1.12...v1.1.13) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 1.1.13 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump proxy-from-env from 1.1.0 to 2.0.0 (#934) Bumps [proxy-from-env](https://github.com/Rob--W/proxy-from-env) from 1.1.0 to 2.0.0. - [Release notes](https://github.com/Rob--W/proxy-from-env/releases) - [Commits](Rob--W/proxy-from-env@v1.1.0...v2.0.0) --- updated-dependencies: - dependency-name: proxy-from-env dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ci(deps): bump docker/build-push-action from 6.18.0 to 6.19.2 (#935) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.18.0 to 6.19.2. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@2634353...10e90e3) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: 6.19.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump path-to-regexp (#953) Bumps the npm_and_yarn group with 1 update in the / directory: [path-to-regexp](https://github.com/pillarjs/path-to-regexp). Updates `path-to-regexp` from 8.3.0 to 8.4.0 - [Release notes](https://github.com/pillarjs/path-to-regexp/releases) - [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md) - [Commits](pillarjs/path-to-regexp@v8.3.0...v8.4.0) --- updated-dependencies: - dependency-name: path-to-regexp dependency-version: 8.4.0 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump the npm_and_yarn group across 1 directory with 2 updates (#954) Bumps the npm_and_yarn group with 2 updates in the / directory: [path-to-regexp](https://github.com/pillarjs/path-to-regexp) and [yaml](https://github.com/eemeli/yaml). Updates `path-to-regexp` from 8.3.0 to 8.4.0 - [Release notes](https://github.com/pillarjs/path-to-regexp/releases) - [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md) - [Commits](pillarjs/path-to-regexp@v8.3.0...v8.4.0) Updates `yaml` from 2.8.2 to 2.8.3 - [Release notes](https://github.com/eemeli/yaml/releases) - [Commits](eemeli/yaml@v2.8.2...v2.8.3) --- updated-dependencies: - dependency-name: path-to-regexp dependency-version: 8.4.0 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: yaml dependency-version: 2.8.3 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * Remove non-deterministic `npm install -g npm` from devcontainer Dockerfile (#956) * Initial plan * Fix alert #129: Remove non-deterministic npm install from devcontainer Dockerfile Agent-Logs-Url: https://github.com/github/safe-settings/sessions/0af97764-5b14-4195-ad8a-6b8adf723453 Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Fix typo in devcontainer Dockerfile comment (Intall -> Install) Agent-Logs-Url: https://github.com/github/safe-settings/sessions/0af97764-5b14-4195-ad8a-6b8adf723453 Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Pin Dockerfile base image to SHA256 digest (#957) * Initial plan * Pin Docker base image to SHA256 digest to fix alert #128 Agent-Logs-Url: https://github.com/github/safe-settings/sessions/afcb39cb-64ea-43c7-8b49-200dd166ad5f Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Use `npm ci` instead of `npm install` in CI workflow (#958) * Initial plan * Replace npm install with npm ci in node-ci.yml workflow Agent-Logs-Url: https://github.com/github/safe-settings/sessions/4460185b-428a-48f4-a8b9-471226ccbf58 Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Replace npm install with npm ci in workflow (#960) * Replace npm install with npm ci in workflow * Replace npm install with npm ci in workflow * Bug/issue 465 (#970) * fix: apply org-level settings before loading repository configurations * fix: enhance descriptions and add new properties for security features in settings.json * fix: update description for deprecated squash-merge commit title property in settings.json * Update api endpoint version * Add JSON schemas for safe-settings configuration at repo, org, and suborg levels - Introduced `repos.json` schema for repository-level safe-settings overrides. - Updated `settings.json` schema to include additional properties for org-level configurations. - Created `suborgs.json` schema for suborg-level safe-settings configuration. - Enhanced the build script to dereference all schemas and handle errors during the process. * chores: fix branches tests * fix(build-schema): enhance schema dereferencing with GitHub API spec * Update docs/github-settings/5. branch-protection.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(schema): simplify description for force_create property --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bug/issue 842 (#928) * fix: apply org-level settings before loading repository configurations * fix: enhance descriptions and add new properties for security features in settings.json * fix: update description for deprecated squash-merge commit title property in settings.json * test: update branch protection tests to handle null restrictions and enforce_admins * fix: normalize branch protection restrictions and preserve existing settings * fix: update GitHub API calls to use the correct namespace for branch protection methods --------- Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * Fix custom_properties diffing when config uses `property_name` (#978) * Initial plan * Handle alternate custom property name shapes in normalize * Add explicit object guard in custom property normalization * Support property_name in custom_properties config entries * Polish custom properties test descriptions --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * fix(variables): add noop mode support (#926) * feat(variables): add noop mode support - Add noop mode support to Variables plugin add/remove/update methods - Return NopCommand instead of making API calls when nop=true - Add comprehensive tests for noop mode behavior Signed-off-by: Kyle Harding <kyle@balena.io> * refactor(variables): align with Diffable contract pattern Refactor Variables plugin to match the single-item Diffable contract used by labels, milestones, and other plugins. The previous update() reimplemented sync() logic internally; now each method handles one item and lets Diffable.sync() orchestrate iteration. - Simplify update() from 90-line array-diffing to single-item PATCH - Simplify changed() from JSON.stringify comparison to value check - Remove getChanged(), lodash dependency, .then(res=>res) no-ops - Match labels.js nop return pattern: Promise.resolve([NopCommand]) - Fix inconsistent toUpperCase() between add/remove/update - Let errors propagate to Diffable.sync() instead of swallowing - Normalize find() to strip API metadata fields (created_at, etc.) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Kyle Harding <kyle@balena.io> --------- Signed-off-by: Kyle Harding <kyle@balena.io> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: update lodash to ^4.18.1 to fix code injection vulnerability (#992) Resolve Dependabot alert #116 - lodash vulnerable to Code Injection via `_.template` imports key names. Updated from ^4.17.21 to ^4.18.1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Jan Bronicki <janbronicki@microsoft.com> Signed-off-by: Kyle Harding <kyle@balena.io> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Tyler Ohlsen <tylerohlsen@hotmail.com> Co-authored-by: Jan Bronicki <janbronicki@microsoft.com> Co-authored-by: Brett Logan <lindluni@github.com> Co-authored-by: Madis Kõosaar <madis.koosaar@solidify.dev> Co-authored-by: Kyle Harding <kyle@balena.io> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: dfabae4c-7df4-49eb-bffa-82f104ac8316
) PR #1001 (dependabot npm_and_yarn group) bumped js-yaml 4.1.1->4.2.0, qs 6.15.0->6.15.2, and shell-quote 1.8.3->1.8.4. These were not yet present in this branch. Rather than merging the dependabot merge commit (baac44d) — which pulls in the entire divergent pre-probot-14.3.2 tree and conflicts massively — the updates were applied surgically via `npm update` against the current probot 14.3.2 lockfile, resolving to equal-or-newer semver-compatible versions that fully cover PR #1001: js-yaml 4.1.1 -> 4.3.1 qs 6.15.0 -> 6.15.3 shell-quote 1.8.3 -> 1.10.0 plus related transitive bumps (js-yaml 3.14.2->3.15.1, side-channel). Validated: unit/integration suite (344 passing; the 7 probot-ESM/Jest suites fail pre-existing from the probot 14.3.2 migration, unrelated), lockfile-lint clean, npm ls clean, and full live smoke-test (181 pass). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…anch instead of renaming When repository.default_branch is configured and differs from the repo's current default branch, safe-settings renames the current default branch. With CREATE_DEFAULT_BRANCH=true, if the configured branch does not exist, safe-settings instead creates a new branch off the current default and promotes it to default, leaving the existing default branch untouched. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…lowing them Re-throw after logging in createDefaultBranch so a failed branch creation or default-branch update stops the sync flow and is recorded, instead of allowing sync to continue and potentially report success. Adds a regression test. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Incorporate 1004 changes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Incorporate 1009 changes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Align repo/suborg TeamSettings schema with team repository permissions Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…sion (#1066) * Handle multiple config changes in a PR or Push event and process them as a batch (#888) * handle multiple changes as a batch * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * depup files in a push * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * moved the dedup logic * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * build(deps): bump undici from 7.7.0 to 7.16.0 (#881) Bumps [undici](https://github.com/nodejs/undici) from 7.7.0 to 7.16.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.7.0...v7.16.0) --- updated-dependencies: - dependency-name: undici dependency-version: 7.16.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump node-cron from 3.0.3 to 4.2.1 (#865) Bumps [node-cron](https://github.com/merencia/node-cron) from 3.0.3 to 4.2.1. - [Release notes](https://github.com/merencia/node-cron/releases) - [Commits](node-cron/node-cron@v3.0.3...v4.2.1) --- updated-dependencies: - dependency-name: node-cron dependency-version: 4.2.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump @apidevtools/json-schema-ref-parser (#882) Bumps [@apidevtools/json-schema-ref-parser](https://github.com/APIDevTools/json-schema-ref-parser) from 12.0.2 to 14.2.1. - [Release notes](https://github.com/APIDevTools/json-schema-ref-parser/releases) - [Commits](APIDevTools/json-schema-ref-parser@v12.0.2...v14.2.1) --- updated-dependencies: - dependency-name: "@apidevtools/json-schema-ref-parser" dependency-version: 14.2.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump minimatch from 10.0.1 to 10.0.3 (#883) Bumps [minimatch](https://github.com/isaacs/minimatch) from 10.0.1 to 10.0.3. - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v10.0.1...v10.0.3) --- updated-dependencies: - dependency-name: minimatch dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps-dev): bump eslint-plugin-import from 2.31.0 to 2.32.0 (#884) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.31.0 to 2.32.0. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](import-js/eslint-plugin-import@v2.31.0...v2.32.0) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-version: 2.32.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump docker/login-action from 3.5.0 to 3.6.0 (#885) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@184bdaa...5e57cd1) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 3.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump actions/setup-node from 4 to 6 (#890) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v4...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump js-yaml in the npm_and_yarn group across 1 directory (#894) Bumps the npm_and_yarn group with 1 update in the / directory: [js-yaml](https://github.com/nodeca/js-yaml). Updates `js-yaml` from 4.1.0 to 4.1.1 - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.1.0...4.1.1) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.1.1 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump docker/metadata-action from 5.8.0 to 5.10.0 (#897) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.8.0 to 5.10.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](docker/metadata-action@c1e5197...c299e40) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-version: 5.10.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump actions/checkout from 4 to 6 (#898) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ci(deps): bump docker/setup-qemu-action from 3.6.0 to 3.7.0 (#899) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.6.0 to 3.7.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](docker/setup-qemu-action@2910929...c7c5346) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-version: 3.7.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump the npm_and_yarn group across 1 directory with 2 updates (#904) Bumps the npm_and_yarn group with 2 updates in the / directory: [jws](https://github.com/brianloveswords/node-jws) and [validator](https://github.com/validatorjs/validator.js). Updates `jws` from 3.2.2 to 3.2.3 - [Release notes](https://github.com/brianloveswords/node-jws/releases) - [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md) - [Commits](auth0/node-jws@v3.2.2...v3.2.3) Updates `validator` from 13.11.0 to 13.15.26 - [Release notes](https://github.com/validatorjs/validator.js/releases) - [Changelog](https://github.com/validatorjs/validator.js/blob/master/CHANGELOG.md) - [Commits](validatorjs/validator.js@13.11.0...13.15.26) --- updated-dependencies: - dependency-name: jws dependency-version: 3.2.3 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: validator dependency-version: 13.15.26 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump qs in the npm_and_yarn group across 1 directory (#912) Bumps the npm_and_yarn group with 1 update in the / directory: [qs](https://github.com/ljharb/qs). Updates `qs` from 6.13.0 to 6.14.1 - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.13.0...v6.14.1) --- updated-dependencies: - dependency-name: qs dependency-version: 6.14.1 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump qs in the npm_and_yarn group across 1 directory (#913) Bumps the npm_and_yarn group with 1 update in the / directory: [qs](https://github.com/ljharb/qs). Updates `qs` from 6.13.0 to 6.14.1 - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.13.0...v6.14.1) --- updated-dependencies: - dependency-name: qs dependency-version: 6.14.1 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump octokit from 5.0.3 to 5.0.5 (#905) Bumps [octokit](https://github.com/octokit/octokit.js) from 5.0.3 to 5.0.5. - [Release notes](https://github.com/octokit/octokit.js/releases) - [Commits](octokit/octokit.js@v5.0.3...v5.0.5) --- updated-dependencies: - dependency-name: octokit dependency-version: 5.0.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump smee-client from 4.3.1 to 5.0.0 (#906) Bumps [smee-client](https://github.com/probot/smee-client) from 4.3.1 to 5.0.0. - [Release notes](https://github.com/probot/smee-client/releases) - [Commits](probot/smee-client@v4.3.1...v5.0.0) --- updated-dependencies: - dependency-name: smee-client dependency-version: 5.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps-dev): bump @eslint/eslintrc from 3.3.1 to 3.3.3 (#908) Bumps [@eslint/eslintrc](https://github.com/eslint/eslintrc) from 3.3.1 to 3.3.3. - [Release notes](https://github.com/eslint/eslintrc/releases) - [Changelog](https://github.com/eslint/eslintrc/blob/main/CHANGELOG.md) - [Commits](eslint/eslintrc@v3.3.1...eslintrc-v3.3.3) --- updated-dependencies: - dependency-name: "@eslint/eslintrc" dependency-version: 3.3.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump docker/setup-buildx-action from 3.11.1 to 3.12.0 (#909) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.11.1 to 3.12.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](docker/setup-buildx-action@e468171...8d2750c) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-version: 3.12.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump undici in the npm_and_yarn group across 1 directory (#921) Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici). Updates `undici` from 7.16.0 to 7.18.2 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.16.0...v7.18.2) --- updated-dependencies: - dependency-name: undici dependency-version: 7.18.2 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * ci(deps): bump docker/login-action from 3.6.0 to 3.7.0 (#924) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.6.0 to 3.7.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@5e57cd1...c94ce9f) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 3.7.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump the npm_and_yarn group across 1 directory with 2 updates (#927) Bumps the npm_and_yarn group with 2 updates in the / directory: [lodash](https://github.com/lodash/lodash) and @isaacs/brace-expansion. Updates `lodash` from 4.17.21 to 4.17.23 - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.21...4.17.23) Updates `@isaacs/brace-expansion` from 5.0.0 to 5.0.1 --- updated-dependencies: - dependency-name: lodash dependency-version: 4.17.23 dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: "@isaacs/brace-expansion" dependency-version: 5.0.1 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [WIP] Upgrade project to support Node.js 22 and 24 (#939) * Initial plan * Upgrade Node.js to 22 and 24 (last 2 LTS versions) Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Fix Dependabot CI: correct actor check from `dependabot` to `dependabot[bot]` (#940) * Initial plan * Initial plan for fixing CI workflow test Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Fix Dependabot actor check in node-ci.yml workflow The `if` condition used `'dependabot'` but Dependabot's actual GitHub actor username is `'dependabot[bot]'`. This caused the test job to run for Dependabot PRs when it should be skipped, resulting in npm install failures due to ESLint 10 peer dependency conflicts. Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Refactor advanced CodeQL workflow steps (#941) * Added support for proxy servers in all execution environments (#917) * Added support for proxy servers in all execution environments * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * build(deps): bump probot from 13.4.4 to 14.2.4 (#907) * build(deps): bump probot from 13.4.4 to 14.2.4 Bumps [probot](https://github.com/probot/probot) from 13.4.4 to 14.2.4. - [Release notes](https://github.com/probot/probot/releases) - [Commits](probot/probot@v13.4.4...v14.2.4) --- updated-dependencies: - dependency-name: probot dependency-version: 14.2.4 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Fix test suite failures caused by ESM-only `@octokit/core` and `probot` dependencies (#938) * Initial plan * Initial plan for fixing failing test suites Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Fix failing test suites caused by ESM-only dependencies Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Update minimatch dependency version to 10.2.1 * Fix devcontainer configuration and update dependencies (#942) * fix devcontainer * Update .devcontainer/Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .devcontainer/Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .devcontainer/devcontainer.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: prevent race conditions by creating new objects for repository configurations (#943) * fix: prevent race conditions by creating new objects for repository configurations Signed-off-by: Jan Bronicki <janbronicki@microsoft.com> * Update lib/plugins/repository.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: Jan Bronicki <janbronicki@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Change helm defaults to be more newcomer friendly (#919) * Updated container port to match the port exposed by the application inside the container * Added examples for common environment variables * Changed validators to be examples in comments to avoid needing to override * Changed min replica count to 1 for more cost effective defaults * Updated min replica default in docs * Updated service port default in docs * Updated validator defaults in docs * Updated restricted repos include default in docs * Update helm/safe-settings/values.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update helm/safe-settings/values.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Updated README to match the new default value Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: add HOST=0.0.0.0 env to Dockerfile for probot v14 compatibility (#948) Agent-Logs-Url: https://github.com/github/safe-settings/sessions/6a4f5799-ea1f-4900-a659-b492dbdf5cfc Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * fix: migrate all octokit API calls to .rest namespace for probot v14 compatibility (#949) * fix: override NODE_ENV=development in functional test and add retry logic Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/safe-settings/sessions/97b10121-f26e-44c0-86e6-3ede047fe176 * fix: add --fail to curl and || true to docker logs in functional test Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/safe-settings/sessions/97b10121-f26e-44c0-86e6-3ede047fe176 * fix: migrate all octokit API calls to .rest namespace for probot v14 compatibility and revert Dockerfile ENV HOST Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/safe-settings/sessions/179c9d77-8ca0-4098-9017-8a255df170f9 * Update lib/plugins/repository.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: address review feedback - NopCommand repo arg, milestones mock, teams test error propagation Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/safe-settings/sessions/d9420b15-2cca-40a3-a30b-869df73487f1 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add HOST environment variable to Dockerfile (#950) * docs: add troubleshooting section for Docker build and runtime issues (#951) * build(deps): bump undici in the npm_and_yarn group across 1 directory (#947) Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici). Updates `undici` from 7.22.0 to 7.24.1 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.22.0...v7.24.1) --- updated-dependencies: - dependency-name: undici dependency-version: 7.24.1 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps-dev): bump brace-expansion Bumps the npm_and_yarn group with 1 update in the / directory: [brace-expansion](https://github.com/juliangruber/brace-expansion). Updates `brace-expansion` from 1.1.12 to 1.1.13 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v1.1.12...v1.1.13) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 1.1.13 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump proxy-from-env from 1.1.0 to 2.0.0 (#934) Bumps [proxy-from-env](https://github.com/Rob--W/proxy-from-env) from 1.1.0 to 2.0.0. - [Release notes](https://github.com/Rob--W/proxy-from-env/releases) - [Commits](Rob--W/proxy-from-env@v1.1.0...v2.0.0) --- updated-dependencies: - dependency-name: proxy-from-env dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ci(deps): bump docker/build-push-action from 6.18.0 to 6.19.2 (#935) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.18.0 to 6.19.2. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@2634353...10e90e3) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: 6.19.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump path-to-regexp (#953) Bumps the npm_and_yarn group with 1 update in the / directory: [path-to-regexp](https://github.com/pillarjs/path-to-regexp). Updates `path-to-regexp` from 8.3.0 to 8.4.0 - [Release notes](https://github.com/pillarjs/path-to-regexp/releases) - [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md) - [Commits](pillarjs/path-to-regexp@v8.3.0...v8.4.0) --- updated-dependencies: - dependency-name: path-to-regexp dependency-version: 8.4.0 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump the npm_and_yarn group across 1 directory with 2 updates (#954) Bumps the npm_and_yarn group with 2 updates in the / directory: [path-to-regexp](https://github.com/pillarjs/path-to-regexp) and [yaml](https://github.com/eemeli/yaml). Updates `path-to-regexp` from 8.3.0 to 8.4.0 - [Release notes](https://github.com/pillarjs/path-to-regexp/releases) - [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md) - [Commits](pillarjs/path-to-regexp@v8.3.0...v8.4.0) Updates `yaml` from 2.8.2 to 2.8.3 - [Release notes](https://github.com/eemeli/yaml/releases) - [Commits](eemeli/yaml@v2.8.2...v2.8.3) --- updated-dependencies: - dependency-name: path-to-regexp dependency-version: 8.4.0 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: yaml dependency-version: 2.8.3 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * Remove non-deterministic `npm install -g npm` from devcontainer Dockerfile (#956) * Initial plan * Fix alert #129: Remove non-deterministic npm install from devcontainer Dockerfile Agent-Logs-Url: https://github.com/github/safe-settings/sessions/0af97764-5b14-4195-ad8a-6b8adf723453 Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Fix typo in devcontainer Dockerfile comment (Intall -> Install) Agent-Logs-Url: https://github.com/github/safe-settings/sessions/0af97764-5b14-4195-ad8a-6b8adf723453 Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Pin Dockerfile base image to SHA256 digest (#957) * Initial plan * Pin Docker base image to SHA256 digest to fix alert #128 Agent-Logs-Url: https://github.com/github/safe-settings/sessions/afcb39cb-64ea-43c7-8b49-200dd166ad5f Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Use `npm ci` instead of `npm install` in CI workflow (#958) * Initial plan * Replace npm install with npm ci in node-ci.yml workflow Agent-Logs-Url: https://github.com/github/safe-settings/sessions/4460185b-428a-48f4-a8b9-471226ccbf58 Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: decyjphr <57544838+decyjphr@users.noreply.github.com> * Replace npm install with npm ci in workflow (#960) * Replace npm install with npm ci in workflow * Replace npm install with npm ci in workflow * Bug/issue 465 (#970) * fix: apply org-level settings before loading repository configurations * fix: enhance descriptions and add new properties for security features in settings.json * fix: update description for deprecated squash-merge commit title property in settings.json * Update api endpoint version * Add JSON schemas for safe-settings configuration at repo, org, and suborg levels - Introduced `repos.json` schema for repository-level safe-settings overrides. - Updated `settings.json` schema to include additional properties for org-level configurations. - Created `suborgs.json` schema for suborg-level safe-settings configuration. - Enhanced the build script to dereference all schemas and handle errors during the process. * chores: fix branches tests * fix(build-schema): enhance schema dereferencing with GitHub API spec * Update docs/github-settings/5. branch-protection.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update index.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(schema): simplify description for force_create property --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bug/issue 842 (#928) * fix: apply org-level settings before loading repository configurations * fix: enhance descriptions and add new properties for security features in settings.json * fix: update description for deprecated squash-merge commit title property in settings.json * test: update branch protection tests to handle null restrictions and enforce_admins * fix: normalize branch protection restrictions and preserve existing settings * fix: update GitHub API calls to use the correct namespace for branch protection methods --------- Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * Fix custom_properties diffing when config uses `property_name` (#978) * Initial plan * Handle alternate custom property name shapes in normalize * Add explicit object guard in custom property normalization * Support property_name in custom_properties config entries * Polish custom properties test descriptions --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * fix(variables): add noop mode support (#926) * feat(variables): add noop mode support - Add noop mode support to Variables plugin add/remove/update methods - Return NopCommand instead of making API calls when nop=true - Add comprehensive tests for noop mode behavior Signed-off-by: Kyle Harding <kyle@balena.io> * refactor(variables): align with Diffable contract pattern Refactor Variables plugin to match the single-item Diffable contract used by labels, milestones, and other plugins. The previous update() reimplemented sync() logic internally; now each method handles one item and lets Diffable.sync() orchestrate iteration. - Simplify update() from 90-line array-diffing to single-item PATCH - Simplify changed() from JSON.stringify comparison to value check - Remove getChanged(), lodash dependency, .then(res=>res) no-ops - Match labels.js nop return pattern: Promise.resolve([NopCommand]) - Fix inconsistent toUpperCase() between add/remove/update - Let errors propagate to Diffable.sync() instead of swallowing - Normalize find() to strip API metadata fields (created_at, etc.) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Kyle Harding <kyle@balena.io> --------- Signed-off-by: Kyle Harding <kyle@balena.io> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: update lodash to ^4.18.1 to fix code injection vulnerability (#992) Resolve Dependabot alert #116 - lodash vulnerable to Code Injection via `_.template` imports key names. Updated from ^4.17.21 to ^4.18.1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * build(deps): bump uuid in the npm_and_yarn group across 1 directory Bumps the npm_and_yarn group with 1 update in the / directory: [uuid](https://github.com/uuidjs/uuid). Updates `uuid` from 8.3.2 to 14.0.0 - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md) - [Commits](uuidjs/uuid@v8.3.2...v14.0.0) --- updated-dependencies: - dependency-name: uuid dependency-version: 14.0.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Bug/archived repo (#991) * fix: apply org-level settings before loading repository configurations * fix: enhance descriptions and add new properties for security features in settings.json * fix: update description for deprecated squash-merge commit title property in settings.json * fix issue with archived repos --------- Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump the npm_and_yarn group across 1 directory with 3 updates Bumps the npm_and_yarn group with 3 updates in the / directory: [js-yaml](https://github.com/nodeca/js-yaml), [qs](https://github.com/ljharb/qs) and [shell-quote](https://github.com/ljharb/shell-quote). Updates `js-yaml` from 4.1.1 to 4.2.0 - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/commits) Updates `qs` from 6.15.0 to 6.15.2 - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](ljharb/qs@v6.15.0...v6.15.2) Updates `shell-quote` from 1.8.3 to 1.8.4 - [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md) - [Commits](ljharb/shell-quote@v1.8.3...v1.8.4) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.2.0 dependency-type: direct:production dependency-group: npm_and_yarn - dependency-name: qs dependency-version: 6.15.2 dependency-type: indirect dependency-group: npm_and_yarn - dependency-name: shell-quote dependency-version: 1.8.4 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> * Initial plan * feat: add priorityClassName support to Helm chart * Add include/exclude repo filters to team settings Team entries are filtered by the same Diffable include/exclude logic that collaborators use, but unlike collaborators those keys were never part of the TeamSettings schema or documented, so editors and linters can't validate them. Mirror the CollaboratorSettings allOf pattern to declare include and exclude on TeamSettings, document both in the teams guide with examples, add a sample, and cover the filter path with unit tests. No runtime changes. * build(deps-dev): bump flatted from 3.3.4 to 3.4.4 (#1055) Bumps [flatted](https://github.com/WebReflection/flatted) from 3.3.4 to 3.4.4. - [Commits](WebReflection/flatted@v3.3.4...v3.4.4) --- updated-dependencies: - dependency-name: flatted dependency-version: 3.4.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump undici in the npm_and_yarn group across 1 directory (#1058) Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici). Updates `undici` from 7.24.5 to 7.29.0 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.24.5...v7.29.0) --- updated-dependencies: - dependency-name: undici dependency-version: 7.29.0 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps-dev): bump shell-quote from 1.8.4 to 1.10.0 (#1057) Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.8.4 to 1.10.0. - [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md) - [Commits](ljharb/shell-quote@v1.8.4...v1.10.0) --- updated-dependencies: - dependency-name: shell-quote dependency-version: 1.10.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump js-yaml in the npm_and_yarn group across 1 directory (#1059) Bumps the npm_and_yarn group with 1 update in the / directory: [js-yaml](https://github.com/nodeca/js-yaml). Updates `js-yaml` from 4.2.0 to 4.3.1 - [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.1/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.2.0...4.3.1) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.3.1 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps-dev): bump brace-expansion (#1060) Bumps the npm_and_yarn group with 1 update in the / directory: [brace-expansion](https://github.com/juliangruber/brace-expansion). Updates `brace-expansion` from 1.1.13 to 1.1.18 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v1.1.13...v1.1.18) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 1.1.18 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yadhav Jayaraman <57544838+decyjphr@users.noreply.github.com> * build(deps): bump body-parser (#1061) Bumps the npm_and_yarn group with 1 update in the / directory: [body-parser](https://github.com/expressjs/body-parser). Updates `body-parser` from 2.2.2 to 2.3.0 - [Release notes](https://github.com/expressjs/body-parser/releases) - [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md) - [Commits](expressjs/body-parser@v2.2.2...v2.3.0) --- updated-dependencies: - dependency-name: body-parser dependency-version: 2.3.0 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix GHSA-52cp-r559-cp3m: resolve transitive js-yaml via jest and lockfile-lint upgrades (#1064) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Jan Bronicki <janbronicki@microsoft.com> Signed-off-by: Kyle Harding <kyle@balena.io> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Tyler Ohlsen <tylerohlsen@hotmail.com> Co-authored-by: Jan Bronicki <janbronicki@microsoft.com> Co-authored-by: Brett Logan <lindluni@github.com> Co-authored-by: Madis Kõosaar <madis.koosaar@solidify.dev> Co-authored-by: Kyle Harding <kyle@balena.io> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: neatcoder <28711376+neatcoder@users.noreply.github.com>
syncExternalGroup used the raw config `name` as `team_slug` when calling the external-groups endpoints. A display name (e.g. "Platform & Security!") is not a valid team slug and 404s against those endpoints. Normalize with `normalizeTeamIdentifier`, matching how the rest of the plugin builds `team_slug` (getByName, toParams), and add a regression test covering a display-name team. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2daa416c-8f2a-4fb2-a41d-b3a0a1062e1a
…lag' into _merge_flag # Conflicts: # lib/env.js # test/unit/lib/plugins/repository.test.js
…es (#1068) When safe-settings applies changes to repositories, users need visibility into what actions are being taken without enabling debug logging. This change adds informational log messages when changes are applied, while keeping detailed diffs at debug level. The info messages indicate: - Which plugin is applying changes (branches, repository settings, topics, labels, etc.) - Which repository is being modified - That detailed diffs are available at debug level This improves operational visibility and makes it easier to track configuration changes in production environments without overwhelming logs with detailed diffs. Co-authored-by: Tomas Dabašinskas <tomas.dabasinskas@datolabs.io>
Incorporate avelizmu's repo-scoped optimization for suborgproperties and suborgteams so single-repo syncs inspect only that repo's teams/custom properties instead of enumerating every repo of every suborg org-wide. Conflict in updateRepos() resolved by keeping both the getSubOrgConfigs(repo) argument and this branch's reevaluateOnChange preMatchedSuborgSources snapshot. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…able-dollop Incorporate PR #1031: repo-scoped suborg config resolution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Starting with the version 2.1.18 that seemed to be most stable, I've been testing and fixing minor bugs and adding a few critical features and enhancements:
This pull request introduces several major improvements and features to
safe-settings, including enhanced plugin control, suborg re-evaluation logic, expanded documentation, and updated permissions for custom roles. The most important changes are grouped and summarized below.Plugin Control Enhancements
disable_plugins: Adds support for disabling safe-settings plugins at any config layer (deployment, org, suborg, repo) using a newdisable_pluginskey. Includes a detailed strip matrix, cascade rules, and limitations. Documentation and sample settings files have been updated with usage examples. [1]], [2]], [3]], [4]], [5]])additive_plugins: Introduces theadditive_pluginskey at the org level, allowing selected Diffable plugins to only add or update entries, never remove them. This enables merging external changes with policy. Documentation and samples are provided. [1]], [2]])Suborg Re-evaluation Logic
safe-settingsnow re-evaluates suborgs and re-applies settings if a new suborg matches. Includes loop prevention and performance optimizations. ([README.mdR181-R201])Permissions and Integration Updates
app.ymlto request the necessary permissions for managing custom organization and repository roles, supporting new features in GitHub Enterprise Cloud. ([app.ymlR116-R123])index.jsto deduplicate repo/suborg changes and streamline sync operations for selected repos and suborgs. [1]], [2]], [3]])Documentation Improvements
external_groupproperty for teams, describing how to link GitHub teams to external IdP groups via API. ([docs/github-settings/4. teams.mdR51-R63])Other
app.ymlfor formatting. ([app.ymlL28])These changes significantly improve the flexibility, safety, and observability of
safe-settings, especially for large organizations with complex policies.