openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

refactor(tools): update GitHub tool slugs for clarity and remove deprecated entry

Open YellowSnnowmann opened this issue 6 months ago β€’ 1 comments

fix(composio): update GitHub action slugs

Summary

  • Updates the GitHub Composio provider to use the current v3 action slugs:
    • GITHUB_GET_THE_AUTHENTICATED_USER
    • GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS
  • Updates GitHub provider tests to assert the new curated slugs.
  • Updates inline GitHub sync/provider comments and error text so they match the runtime action names.

Validation

  • Verified the new GitHub slugs against the backend execute endpoint:
    • Current slugs returned ActionExecute_ConnectedAccountNotFound, which confirms the tool slug is recognized but the account is not connected.
    • Old slug GITHUB_GET_AUTHENTICATED_USER returned Tool_ToolNotFound.
  • Ran focused test:
cargo test --manifest-path /Users/cardinal/Desktop/projects/main/openhuman/Cargo.toml curated_tools_contains_core_actions --lib

Result: passed. Closes: https://github.com/tinyhumansai/openhuman/issues/2768

Notes

  • This PR intentionally includes only the GitHub runtime/test slug changes.
  • Other platform slug audit changes remain local and are not part of this PR.

Summary by CodeRabbit

  • New Features

    • GitHub search now includes pull requests in addition to issues.
  • Bug Fixes

    • Issue closing workflows updated to use unified update action for state changes.

Review Change Stack

YellowSnnowmann avatar May 27 '26 14:05 YellowSnnowmann

πŸ“ Walkthrough

Walkthrough

The PR updates the GitHub Composio provider tool catalog to remove a dedicated close-issue entry in favor of inline guidance using update-issue with a state parameter, and migrates the admin deletion tool from branch-specific to generic reference deletion.

Changes

GitHub Composio Tool Catalog Entry Updates

Layer / File(s) Summary
Tool catalog comment for issue closing
src/openhuman/memory_sync/composio/providers/github/tools.rs
Removed the dedicated GITHUB_CLOSE_AN_ISSUE entry and added inline guidance to use GITHUB_UPDATE_AN_ISSUE with state:"closed".
Admin delete action and test updates
src/openhuman/memory_sync/composio/providers/github/tools.rs, src/openhuman/memory_sync/composio/providers/github/tests.rs
Swapped the admin destructive tool slug from the branch-specific variant to GITHUB_DELETE_A_REFERENCE (requires refs/... full ref), and updated unit tests to assert new repository-related slugs, the GITHUB_DELETE_A_REFERENCE slug, and the absence of GITHUB_CLOSE_AN_ISSUE.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • tinyhumansai/openhuman#2488: Related edits to the GitHub curated tool catalog and corresponding test assertions (close-issue removal and delete->reference change).

Suggested reviewers

  • senamakel

Poem

A rabbit hops through code so clean,
Notes swapped and tests made keen,
Close with update, refs take flight,
Small edits roll into the night. 🐰

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title 'refactor(tools): update GitHub tool slugs for clarity and remove deprecated entry' accurately summarizes the main changes: updating GitHub Composio tool slugs and removing the deprecated close-issue entry.
Linked Issues check βœ… Passed The pull request fully addresses the requirements from issue #2768: updates outdated GitHub Composio action slugs (GITHUB_GET_AUTHENTICATED_USER to GITHUB_GET_THE_AUTHENTICATED_USER and GITHUB_SEARCH_ISSUES to GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS), removes deprecated close-issue entry, and updates corresponding test assertions.
Out of Scope Changes check βœ… Passed All changes are scoped to GitHub provider slug updates and test assertions as specified in issue #2768; no unrelated or out-of-scope modifications are present in the changeset.
Docstring Coverage βœ… Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar May 27 '26 14:05 coderabbitai[bot]

Thanks for the thorough reviews, @graycyrus and @M3gA-Mind!

Pushed cb6540b addressing all feedback:

@M3gA-Mind β€” required:

  • Added all four missing assertions to curated_tools_contains_core_actions: LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER, CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER, DELETE_A_REFERENCE, and a negative assertion that CLOSE_AN_ISSUE is absent (with the migration message as the failure string).

@graycyrus + @M3gA-Mind β€” GITHUB_DELETE_A_REFERENCE docs:

  • Added an inline comment in tools.rs explaining that callers must pass a full ref path (refs/heads/branch-name or refs/tags/v1.0), that a bare branch name 404s, and that the action is broader than the old DELETE_A_BRANCH (tags included). The ops-awareness note is now in the commit message too.

@graycyrus β€” undocumented changes: Good call. The PR body previously only called out the two slug renames that triggered the investigation. The full list of changes is:

  • GITHUB_GET_THE_AUTHENTICATED_USER β€” slug corrected (was GITHUB_GET_AUTHENTICATED_USER)
  • GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS β€” slug corrected (was GITHUB_SEARCH_ISSUES)
  • GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER β€” slug corrected
  • GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER β€” slug corrected
  • GITHUB_DELETE_A_BRANCH β†’ GITHUB_DELETE_A_REFERENCE β€” Composio v3 rename; semantic note added to the comment
  • GITHUB_CLOSE_AN_ISSUE removed β€” no dedicated v3 slug; callers use UPDATE_AN_ISSUE with state:"closed"

@M3gA-Mind β€” nit (CLOSE_AN_ISSUE comment): The comment in tools.rs already had the state:"closed" guidance from the previous commit. No change needed there.

YellowSnnowmann avatar May 28 '26 07:05 YellowSnnowmann