Skip to content

Commit dc4cf49

Browse files
Akash1134Copilot
andauthored
Update .github/workflows/copilot_labeller.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent d688374 commit dc4cf49

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/copilot_labeller.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,14 @@ jobs:
121121
}
122122
}' > repository_label_data.json
123123
124-
echo 'LABEL_ID='$(jq '.data.repository.labels.edges[].node | .id ' repository_label_data.json) >> $GITHUB_ENV
124+
LABEL_ID=$(jq -r '.data.repository.labels.edges[0]?.node?.id // empty' repository_label_data.json)
125+
if [ -z "$LABEL_ID" ]; then
126+
echo "No matching label found for the selected area. Skipping labeling step."
127+
fi
128+
echo "LABEL_ID=$LABEL_ID" >> $GITHUB_ENV
125129
126130
- name: Label the discussion
127-
if: ${{ steps.get_selected_feature_area.outputs.result != '' }}
131+
if: ${{ steps.get_selected_feature_area.outputs.result != '' && env.LABEL_ID != '' }}
128132
env:
129133
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130134
run: |

0 commit comments

Comments
 (0)