Add first-class issue sharing support - #1
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
share_issue/unshare_issuemethods toLinearClient, mirroring theadd_label/remove_labelpair exactlyIssueSharedAccessentity and exposesshared_access/inherits_shared_accessonIssueDetail(viaissue_detailsonly — lightweightissue()selection unchanged)IssueShareRequest,IssueUnshareRequest,ShareIssueResponse,UnshareIssueResponse,IssueSharedAccessChanged files
models/entities.pyIssueSharedAccessmodel; addedshared_access+inherits_shared_accesstoIssueDetailmodels/requests.pyIssueShareRequest,IssueUnshareRequestmodels/responses.pyShareIssueResponse,UnshareIssueResponsegraphql/queries.pyISSUE_SHARE,ISSUE_UNSHAREmutations; extendedISSUE_DETAIL_FIELDSwithsharedAccess/inheritsSharedAccessclient.pyshare_issue,unshare_issuemethods with preconditions in docstrings__init__.py+models/__init__.pytests/test_issue_extras.pyscripts/smoke_test.pyLINEAR_TEST_SHARE_USER_IDunset or team has sharing disabledREADME.mdTest plan
uv run pytest— 131 passed, 1 skipped, coverage 99.87% (was 99.87% before)uv run ruff check— cleanLINEAR_TEST_SHARE_USER_IDset 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