Skip to content

Add first-class issue sharing support - #1

Merged
eli-the-wizard merged 2 commits into
mainfrom
feature/issue-sharing
Sep 18, 2026
Merged

eli-the-wizard merged 2 commits into
mainfrom
feature/issue-sharing

Conversation

@eli-the-wizard

@eli-the-wizard eli-the-wizard commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Adds share_issue / unshare_issue methods to LinearClient, mirroring the add_label / remove_label pair exactly
  • Adds IssueSharedAccess entity and exposes shared_access / inherits_shared_access on IssueDetail (via issue_details only — lightweight issue() selection unchanged)
  • Exports all new symbols from the package root: IssueShareRequest, IssueUnshareRequest, ShareIssueResponse, UnshareIssueResponse, IssueSharedAccess

Changed files

File What changed
models/entities.py Added IssueSharedAccess model; added shared_access + inherits_shared_access to IssueDetail
models/requests.py Added IssueShareRequest, IssueUnshareRequest
models/responses.py Added ShareIssueResponse, UnshareIssueResponse
graphql/queries.py Added ISSUE_SHARE, ISSUE_UNSHARE mutations; extended ISSUE_DETAIL_FIELDS with sharedAccess / inheritsSharedAccess
client.py Added share_issue, unshare_issue methods with preconditions in docstrings
__init__.py + models/__init__.py Export all new symbols
tests/test_issue_extras.py 5 new tests: share success, unshare success, error propagation, detail parses shared, detail parses not-shared
scripts/smoke_test.py Share/unshare leg; skips gracefully when LINEAR_TEST_SHARE_USER_ID unset or team has sharing disabled
README.md Two new rows in method table; "Sharing issues" section with usage snippet, preconditions, and filter examples

Test plan

  • uv run pytest — 131 passed, 1 skipped, coverage 99.87% (was 99.87% before)
  • uv run ruff check — clean
  • mypy strict — clean (pre-commit hook passed)
  • Live smoke test with LINEAR_TEST_SHARE_USER_ID set to a real user UUID (manual, requires a workspace with issue sharing enabled)

Linear Issue: https://linear.app/hackerone-issues/issue/RAV-44

🤖 Generated with Claude Code

eli-the-wizard and others added 2 commits September 18, 2026 10:25
Add share_issue / unshare_issue methods to LinearClient, mirroring the
add_label / remove_label pair.  Exposes IssueSharedAccess on IssueDetail
so callers can verify a share landed and inspect who has access.

New public surface:
- IssueShareRequest / IssueUnshareRequest (Pydantic request models)
- ShareIssueResponse / UnshareIssueResponse (mutation response models)
- LinearClient.share_issue / unshare_issue (send issueShare/issueUnshare)
- IssueSharedAccess entity (is_shared, shared_with_count, shared_with_users,
  disallowed_issue_fields, viewer_has_only_shared_access)
- IssueDetail.shared_access + IssueDetail.inherits_shared_access (populated
  by issue_details; not added to the lightweight issue() selection)
- ISSUE_DETAIL_FIELDS GraphQL fragment extended with sharedAccess /
  inheritsSharedAccess
- README: two new rows in the method table, a "Sharing issues" usage section
  with preconditions doc and filter examples
- smoke_test: share/unshare leg (skipped when LINEAR_TEST_SHARE_USER_ID
  is unset; also skipped gracefully when sharing is not enabled for the team)

All tests pass; coverage stays at 99.87 %.

Linear Issue: https://linear.app/hacker0x01/issue/ENG-TODO

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- docs/api/requests.md: add IssueShareRequest, IssueUnshareRequest to members list
- docs/api/responses.md: add ShareIssueResponse, UnshareIssueResponse to members list
- docs/api/models.md: add IssueSharedAccess to members list
- docs/usage.md: add "Sharing issues" section with usage snippet, preconditions, and filter examples

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eli-the-wizard
eli-the-wizard merged commit 10fbfb0 into main Sep 18, 2026
4 checks passed
@eli-the-wizard
eli-the-wizard deleted the feature/issue-sharing branch September 18, 2026 14:36
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