Skip to content

Yadhav/fix recent issues#990

Draft
decyjphr wants to merge 17 commits into
main-enterprisefrom
yadhav/fix-recent-issues
Draft

Yadhav/fix recent issues#990
decyjphr wants to merge 17 commits into
main-enterprisefrom
yadhav/fix-recent-issues

Conversation

@decyjphr
Copy link
Copy Markdown
Collaborator

@decyjphr decyjphr commented Jun 4, 2026

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

  • Disabling plugins with disable_plugins: Adds support for disabling safe-settings plugins at any config layer (deployment, org, suborg, repo) using a new disable_plugins key. 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 with additive_plugins: Introduces the additive_plugins key 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

  • Automatic suborg re-evaluation after repo-level changes: When a repo-level change might affect suborg membership (e.g., teams, properties, name), safe-settings now 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

  • Custom roles permissions for GitHub App: Updates app.yml to request the necessary permissions for managing custom organization and repository roles, supporting new features in GitHub Enterprise Cloud. ([app.ymlR116-R123])
  • Webhook event deduplication and improved sync logic: Refactors the main sync functions in index.js to deduplicate repo/suborg changes and streamline sync operations for selected repos and suborgs. [1]], [2]], [3]])

Documentation Improvements

  • Smoke test documentation: Adds comprehensive instructions and explanations for running the end-to-end smoke test, including prerequisites, configuration, usage, and test phases. ([README.mdR717-R811])
  • External group linking for teams: Documents the new external_group property for teams, describing how to link GitHub teams to external IdP groups via API. ([docs/github-settings/4. teams.mdR51-R63])

Other

  • Minor cleanup in app.yml for formatting. ([app.ymlL28])

These changes significantly improve the flexibility, safety, and observability of safe-settings, especially for large organizations with complex policies.

decyjphr and others added 17 commits October 3, 2025 17:03
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.
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant