Skip to content

fix(skills): make --label and --assignee actually work in Linear skill - #27213

Closed
flamiinngo wants to merge 3 commits into
NousResearch:mainfrom
flamiinngo:fix/linear-label-assignee-create-update
Closed

fix(skills): make --label and --assignee actually work in Linear skill#27213
flamiinngo wants to merge 3 commits into
NousResearch:mainfrom
flamiinngo:fix/linear-label-assignee-create-update

Conversation

@flamiinngo

Copy link
Copy Markdown
Contributor

What was broken

The Linear skill's create-issue and update-issue commands listed --label
and --assignee in the help text, but passing them did nothing. The issue
would be created successfully with neither the label nor assignee applied
no error, no warning, just silently dropped.

Fix

Added two lookup helpers that search the team's labels and members by
name and return their IDs. Both create-issue and update-issue now use
these to resolve names before sending the API request.

If a label or assignee name doesn't exist in the team, the command exits
with a clear error message instead of pretending it worked.

Verified on

  • Windows 11, Python 3.13, live Linear workspace
  • create-issue --label Bug → label shows up on the issue ✓
  • create-issue --label doesnotexist → exits with clear error ✓
  • update-issue follows the same paths ✓

The check-windows-footguns.py script outputs a checkmark (U+2713) and
cross (U+2717) to report results. Windows terminals default to cp1252,
which cannot encode these characters, so running the script on Windows
threw a UnicodeEncodeError before any results were printed.

This made the tool completely unusable on the exact platform it exists
to help -- a developer on Windows trying to check their code for
Windows-safety issues would just get a crash instead.

Fix: reconfigure stdout and stderr to UTF-8 at the start of main(),
before any output is produced. Verified on Windows 11 Home with
Python 3.13 (terminal defaulting to cp1252).
When creating or updating a Linear issue, the --label and --assignee
flags were listed in the help text but never wired up. You could pass
them and the command would succeed, but the issue would be created
without either. No error, no warning -- they were just silently dropped.

This adds the missing name-to-ID lookups so the flags work as
advertised. If a label or assignee name does not exist in the team,
you now get a clear error message instead of a quiet no-op.

Tested against a live Linear workspace on Windows 11.
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) duplicate This issue or pull request already exists labels May 17, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #21143 — both add label and assignee name→ID resolution to the Linear skill. Additionally, #27213 is a strict subset of #27217 (by the same author) which bundles these Linear changes with a security denylist fix. The Linear changes should land via one of those two PRs, not both.

…solvers

Three crash bugs found in code review:

1. _resolve_member_id crashed with AttributeError when the GraphQL API
   returned null for a member displayName field. Fixed by using
   (member.get('displayName') or '').lower() instead of direct access.

2. cmd_update_issue crashed with TypeError when issue['team'] was null.
   Fixed by using (issue.get('team') or {}).get('id') with an explicit
   error message if the team id cannot be determined.

3. Both _resolve_label_id and _resolve_member_id fetched only the first
   100 results with no pagination. Teams with more than 100 labels or
   members would silently return None, causing unnecessary failures.
   Fixed by paginating with hasNextPage/endCursor until all results
   are checked.
@flamiinngo

Copy link
Copy Markdown
Contributor Author

Closing as duplicate of #21143. One note for that PR: the global _resolve_assignee_id may assign to users outside
the team scoping the lookup to team.members avoids that. Also worth adding cursor pagination for teams with >100 members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants