eventespresso / actions

Centralized repository for all of Event Espresso's GitHub Actions used in our CI/CD pipelines
GNU Affero General Public License v3.0
2 stars 6 forks source link

Apply Labels from Other Repo in assignHasFixLabel() #53

Closed tn3rb closed 4 months ago

tn3rb commented 1 year ago

After making changes to https://github.com/eventespresso/barista/pull/1251 the Auto PR Labeler workflow ran but encountered the following error: https://github.com/eventespresso/barista/actions/runs/6397687054/job/17366172149?pr=1251

image

which happened because PR 1251 references an issue from cafe via "closing text" in the original post:

Fixes https://github.com/eventespresso/cafe/issues/816

and we are trying to apply the "has fix" label to that issue.

The error arises because the Auto PR Labeler action was initially set up with the assumption that all labels would belong to the same repo. But since Barista PR 1251 references Cafe Issue 816, we can't apply the Barista Has Fix label, and instead need to apply the Cafe Has Fix label.

This PR attempts to fix this by applying the other repo's label if the first attempt fails. There's probably a more smarterer way to do this, but this was fastest to implement.