Skip to content

BED-9369: encode environment names in child resource paths - #33

Merged
jaredcatkinson merged 1 commit into
mainfrom
fix/BED-9369-encode-environment-names
Aug 19, 2026
Merged

BED-9369: encode environment names in child resource paths#33
jaredcatkinson merged 1 commit into
mainfrom
fix/BED-9369-encode-environment-names

Conversation

@jaredcatkinson

@jaredcatkinson jaredcatkinson commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • URL encode GitHub environment names before calling child-resource endpoints
  • apply the fix to environment variables, secrets, and deployment branch policies
  • add regression coverage for names containing slashes and spaces

Testing

  • uv run pytest tests/test_environment_resources.py tests/test_environment_model.py
  • uv run ruff check src/openhound_github/resources/organization.py tests/test_environment_resources.py

Summary by CodeRabbit

  • Bug Fixes
    • Fixed environment-related API requests for names containing slashes, spaces, or other special characters.
    • Improved pagination paths for environment variables, secrets, and deployment branch policies.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 84938eec-f0d6-4f7b-a588-bf3d9d82c05f

📥 Commits

Reviewing files that changed from the base of the PR and between 0b92689 and 7c722b6.

📒 Files selected for processing (2)
  • src/openhound_github/resources/organization.py
  • tests/test_environment_resources.py

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Walkthrough

Environment child-resource requests now percent-encode environment names before building API paths. Parameterized tests cover slashes, spaces, and combined special characters for variables, secrets, and deployment branch policies.

Changes

Environment path encoding

Layer / File(s) Summary
Encode environment child-resource paths
src/openhound_github/resources/organization.py, tests/test_environment_resources.py
The organization resource adds _encode_path_segment and uses it for environment variable, branch policy, and secret requests. Parameterized tests verify encoded paths for special-character environment names.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 7c722

This PR URL-encodes environment names for child-resource paths and adds regression coverage for spaces and slashes; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: strandutton

Poem

I’m a rabbit with paths tucked tight,
Encoding each slash just right.
Spaces hop away,
Tests guard the way,
And APIs burrow in flight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 27.27% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states that environment names are encoded in child-resource paths, which matches the main change.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/BED-9369-encode-environment-names

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

@jaredcatkinson
jaredcatkinson merged commit ad7f1b1 into main Aug 19, 2026
3 checks passed
@jaredcatkinson
jaredcatkinson deleted the fix/BED-9369-encode-environment-names branch August 19, 2026 20:15
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