Commit 1fa9e7d160 for woocommerce

commit 1fa9e7d1607ee3c14887d4a5a73d940b19e2cefd
Author: Alba Rincón <albarin@users.noreply.github.com>
Date:   Fri Dec 5 15:05:58 2025 +0100

    [Release process] Apply `Release` label and assignee to the release the Linear issue (#62231)

    * Remove team filter when getting the `Release` label from the Linear API

    * Check if the label exists before adding it to the request

    * Add assignee to sub-issues

    * Fix assigneeId scope

diff --git a/.github/workflows/release-assignment.yml b/.github/workflows/release-assignment.yml
index 511fe9f380..bc00afac69 100644
--- a/.github/workflows/release-assignment.yml
+++ b/.github/workflows/release-assignment.yml
@@ -226,7 +226,6 @@ jobs:

             const labels = await linearClient.issueLabels({
               filter: {
-                team: { id: { eq: '${{ secrets.LINEAR_TEAM_ID }}' } },
                 name: { eq: 'Release' }
               }
             });
@@ -346,10 +345,12 @@ jobs:
             const { parent, ...subIssues } = ${{ steps.process-kickoff-templates.outputs.processed-templates }};

             let parentIssue;
+            const labelId = '${{ steps.get-linear-data.outputs.releaseLabelId }}' || null;
+            const assigneeId = '${{ steps.process-kickoff-templates.outputs.userId }}' || null;
+
             try {
-              const assigneeId = '${{ steps.process-kickoff-templates.outputs.userId }}' || null;
               const stateId = '${{ steps.get-linear-data.outputs.inProgressStateId }}' || null;
-              const labelId = '${{ steps.get-linear-data.outputs.releaseLabelId }}' || null;
+
               const parentResult = await linearClient.createIssue({
                 teamId: '${{ secrets.LINEAR_TEAM_ID }}',
                 title: `${parent.title}`,
@@ -375,7 +376,8 @@ jobs:
                     description: subIssue.body,
                     parentId: parentIssue.id,
                     priority: 2,
-                    labelIds: ['${{ steps.get-linear-data.outputs.releaseLabelId }}']
+                    ...(labelId && { labelIds: [labelId] }),
+                    ...(assigneeId && { assigneeId })
                   });
                 } catch (error) {
                   console.log(`Failed to create sub-issue in Linear: ${error.message}`);