Skip to content

fix(lint): guard provider merge member calls - #1635

Merged
SaulMoro merged 1 commit into
Tencent:mainfrom
huong8373tt-beep:fix/provider-merge-member-calls
Oct 31, 2026
Merged

SaulMoro merged 1 commit into
Tencent:mainfrom
huong8373tt-beep:fix/provider-merge-member-calls

Conversation

@huong8373tt-beep

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the maintainer feedback on #1602 after #1630 merged the broader provider-merge migration.

teamai/no-provider-merge already rejects merge command literals and auto-merge identifiers in provider and workflow-delivery code. This PR also rejects direct non-computed member calls such as:

  • octokit.pulls.merge(...)
  • mergeRequest.accept()

The guard remains scoped to src/providers/ and src/workflow/pr-delivery.ts.

Verification

  • focused no-provider-merge tests: 9 passed
  • npm run typecheck: passed
  • targeted oxlint probe: 0 warnings / 0 errors
  • git diff --check: passed

npm run lint ran Oxlint successfully with 0 warnings / 0 errors, then failed in the unrelated, already-stale documentation checks on this main snapshot (generated tool-support and workflow-guide assertions). This PR does not touch documentation or the check script.

Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.

Closes #1602

@SaulMoro SaulMoro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This was generated by AI during triage.

Approving. teamai/no-provider-merge now flags member .merge() and .accept() calls, which closes that part of the gap left when the old scan moved into lint. The plugin flags the pattern on this head and not on main, the repository has no existing hits, and lint is green.

  • [P3 nit] The member check also matches a property read and a schema .merge(); no provider code does either today.
  • [P2 non-blocking, not from this PR] Identifiers are matched exactly (^(?:auto_?merge|merge_when_pipeline_succeeds|mergePullRequest)$), so names such as enablePullRequestAutoMerge still pass, while string literals are matched as substrings. I'm noting it on #1590 rather than asking for it here.

@SaulMoro
SaulMoro merged commit c9447a4 into Tencent:main Oct 31, 2026
16 checks passed
Walternater pushed a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
teamai/no-provider-merge also rejects member .merge() and .accept() calls in provider and workflow delivery code.

Closes Tencent#1602
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.

2 participants