Files
react-native/.github/workflows/addDescriptiveLabels.js
Olga Zinoveva ad4a857d3a Fix occasional failures of triage-issue job (#36846)
Summary:
I added a new step to the triage-issue job last week, to add descriptive labels to issues based on their title. This job has occasionally be failing, [like this](https://github.com/facebook/react-native/actions/runs/4630279135/jobs/8191646900). This happens when no applicable labels are found, and we send up an empty array to the add labels endpoint. Adding an array length check to protect against this case.

## Changelog:
[INTERNAL] [FIXED] - Fixed occasional failures in the issue triage pipeline related to issue labeling

Pull Request resolved: https://github.com/facebook/react-native/pull/36846

Test Plan:
Repro run in my repository before the fix: https://github.com/SlyCaptainFlint/react-native/actions/runs/4631843716 (note that the error is the same as in the example failure listed in the description)
And here is a success on the same issue after the fix: https://github.com/SlyCaptainFlint/react-native/actions/runs/4631920441

Reviewed By: cipolleschi

Differential Revision: D44866639

Pulled By: cortinico

fbshipit-source-id: ace6ebece46d7a160f8be39a6099121e11201318
2023-04-11 11:33:10 -07:00

155 lines
3.2 KiB
JavaScript