Skip to content

chore(ci): move post comment to a script#8279

Open
mabaasit wants to merge 12 commits into
mainfrom
clean-up
Open

chore(ci): move post comment to a script#8279
mabaasit wants to merge 12 commits into
mainfrom
clean-up

Conversation

@mabaasit

Copy link
Copy Markdown
Collaborator

Description

Follow up of #8267

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • If this change could impact the load on the MongoDB cluster, please describe the expected and worst case impact
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

Copilot AI review requested due to automatic review settings July 24, 2026 10:46
@mabaasit
mabaasit requested a review from a team as a code owner July 24, 2026 10:46
@mabaasit
mabaasit requested a review from Anemy July 24, 2026 10:46
with:
show-progress: false

- uses: actions/setup-node@v4

@semgrep-code-mongodb semgrep-code-mongodb Bot Jul 24, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608.

🌟 Fixed in commit 04ed8a0 🌟

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This, we need to fix throughout the repo

permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4

@semgrep-code-mongodb semgrep-code-mongodb Bot Jul 24, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608.

Fixed in commit 04ed8a0

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the “feature flag MMS PR” GitHub Action to move PR-comment posting logic out of an inline github-script block and into a repository script, alongside some related cleanup around context-menu configuration.

Changes:

  • Replace the inline actions/github-script PR-comment logic with a Node-executed script in compass-preferences-model.
  • Add @actions/github as a devDependency to support the new script.
  • Remove the disableContextMenus plumbing and the corresponding disabled prop wiring for context menu providers.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/compass/src/app/components/home.tsx Stops passing the removed disableContextMenus prop.
packages/compass-web/src/entrypoint.tsx Stops passing the removed disableContextMenus prop in the web entrypoint.
packages/compass-preferences-model/scripts/post-feature-flag-comment-on-pr.mts Adds a standalone script to post/update the feature-flag PR comment.
packages/compass-preferences-model/package.json Adds @actions/github to support the new script.
packages/compass-context-menu/src/context-menu-provider.tsx Removes the disabled gate from the base context-menu provider.
packages/compass-components/src/components/context-menu.tsx Removes the disabled prop passthrough to the base provider.
packages/compass-components/src/components/compass-components-provider.tsx Removes disableContextMenus support from the provider wiring.
package-lock.json Lockfile updates for the new dependency set.
.github/workflows/feature-flag-mms-pr.yml Switches the PR-comment step to run the new script.

Comment thread .github/workflows/feature-flag-mms-pr.yml Outdated
Comment thread packages/compass-preferences-model/scripts/post-feature-flag-comment-on-pr.mts Outdated
Comment on lines 136 to 140
utmSource,
utmMedium,
stackedElementsZIndex,
popoverPortalContainer: _popoverPortalContainer,
disableContextMenus,
disableGuideCues,
@github-actions

Copy link
Copy Markdown
Contributor

New Feature Flag Definition Detected

The following new feature flag was added to FEATURE_FLAG_DEFINITIONS in feature-flags.ts:

testFeature

  • Description: Enable test feature
  • Atlas Cloud Scope: group

Once this PR is merged, mms PR will be created automatically. It will add 1 new feature flag config to MMS and will be assigned to the author of this PR. If that fails for some reason, follow the steps listed below instead

Steps to create MMS feature flag manually

For each feature flag, create a new file in the feature-flags/definitions/developer-tools directory with contents corresponding to that feature flag definition.


data-explorer-compass-web-test-feature.yml

# This feature flag config was added from Compass, https://github.com/mongodb-js/compass. If the
# usage of this does not appear within mms codebase, it should not be removed before verifying if its
# being used in Compass. `/explorer/v1/groups/:id/preferences` API exposes this feature flag value
# to Compass dynamically, without being added to `FeatureFlag.java` enum. You can also reach out to
# the compass team on #compass slack channel for more information.
name: mms.featureFlag.dataExplorerCompassWeb.testFeature
namespace: global
scope: "group"
description: "Enable test feature"
phases:
  local: enabled
  local-gov: disabled
  test: controlled
  test-gov: disabled
  dev: controlled
  dev-gov: disabled
  qa: controlled
  qa-gov: disabled
  stage: controlled
  prod: controlled
  prod-gov: disabled
  internal: disabled

@mabaasit mabaasit added no release notes Fix or feature not for release notes no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) labels Jul 24, 2026

@Anemy Anemy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice

"sinon": "^9.2.3",
"typescript": "^6.0.3"
"typescript": "^6.0.3",
"@actions/github": "^9.1.1"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: we should have the deps sorted, with @ at the top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no release notes Fix or feature not for release notes no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants