async def _generate_issue_entities(
        self, client: httpx.AsyncClient
    ) -> AsyncGenerator[Union[LinearIssueEntity, LinearAttachmentEntity], None]:
        """Generate entities for all issues and their attachments in the workspace.

        Args:
            client: HTTP client to use for requests

        Yields:
            Issue entities and attachment entities
        """
        # Define query template with pagination placeholder
        query_template = """
        {{
          issues({pagination}) {{
            nodes {{
              id
              identifier
              title
              description
              priority
              completedAt
              createdAt
              updatedAt
              dueDate
              state {{
                name
              }}
              team {{
                id
                name
              }}
              project {{
                id
                name
              }}
              assignee {{
                name
              }}
            }}
            pageInfo {{
              hasNextPage
              endCursor
            }}
          }}
        }}
        """

        # Define processor function for issue nodes
        async def process_issue(issue):
            issue_identifier = issue.get("identifier")

            # Skip issues matching exclude_path
            if self.exclude_path and issue_identifier and self.exclude_path in issue_identifier:
                logger.info(f"Skipping excluded issue: {issue_identifier}")
                return

            issue_title = issue.get("title")
            issue_description = issue.get("description", "")

            logger.info(f"Processing issue: {issue_identifier} - '{issue_title}'")

            # Build breadcrumbs list
            breadcrumbs = []

            # Add team breadcrumb if available
            team_id = None
            team_name = None
            if issue.get("team"):
                team_id = issue["team"].get("id")
                team_name = issue["team"].get("name")
                team_breadcrumb = Breadcrumb(entity_id=team_id, name=team_name, type="team")
                breadcrumbs.append(team_breadcrumb)

            # Add project breadcrumb if available
            project_id = None
            project_name = None
            if issue.get("project"):
                project_id = issue["project"].get("id")
                project_name = issue["project"].get("name")
                project_breadcrumb = Breadcrumb(
                    entity_id=project_id, name=project_name, type="project"
                )
                breadcrumbs.append(project_breadcrumb)

            # Create issue URL
            issue_url = f"https://linear.app/issue/{issue.get('identifier')}"
            issue_id = issue.get("id")

            # Create and yield LinearIssueEntity
            issue_entity = LinearIssueEntity(
                entity_id=issue_id,
                title=issue.get("title", ""),
                breadcrumbs=breadcrumbs,
                url=issue_url,
                # LinearIssueEntity specific fields
                identifier=issue_identifier,
                description=issue_description,
                priority=issue.get("priority"),
                state=issue.get("state", {}).get("name"),
                team_id=team_id,
                team_name=team_name,
                project_id=project_id,
                project_name=project_name,
                assignee=issue.get("assignee", {}).get("name") if issue.get("assignee") else None,
                created_at=issue.get("createdAt"),
                updated_at=issue.get("updatedAt"),
                completed_at=issue.get("completedAt"),
                due_date=issue.get("dueDate"),
            )

            # First yield the issue entity
            yield issue_entity

            # Create issue breadcrumb for attachments
            issue_breadcrumb = Breadcrumb(
                entity_id=issue_entity.entity_id, name=issue_entity.title, type="issue"
            )

            # Combine breadcrumbs with issue breadcrumb
            issue_breadcrumbs = breadcrumbs + [issue_breadcrumb]

            # Extract attachments from description
            if issue_description:
                async for attachment in self._generate_attachment_entities_from_description(
                    client, issue_id, issue_identifier, issue_description, issue_breadcrumbs
                ):
                    if attachment:
                        yield attachment

        # Use the paginated query helper
        async for entity in self._paginated_query(
            client, query_template, process_issue, entity_type="issues"
        ):
            yield entity
Generate entities for all issues and their attachments in the workspace.

        Args:
            client: HTTP client to use for requests

        Yields:
            Issue entities and attachment entities
        
backend/airweave/platform/sources/linear.py