GH PRs with one label whose length exceeds 50 chars endup with failing PR (no label, no assignees): truncate too long labels #31080
gberche-orange
started this conversation in
Suggest an Idea
Replies: 1 comment
-
I have separated a bug from your description in an issue here: #31091 Regarding the improvements you suggested, lets wait for a maintainer's response for that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Expected behavior
Assigning custom github label should be resistant to one of the labels exceeding the github max label length (50 chars)
Current behavior
Currently, renovate codebase does not recover from this condition, and the other valid labels are not assigned to the PR, resulting in the PR creation status to failed with
The handlebar templating language does not seem to support expression for truncating strings in expressions, or obtaining substrings. See https://handlebarsjs.com/api-reference/utilities.html#helper-utilities.
So it does not seem possible to reliably assign labels from renovate variable lengths fields at https://docs.renovatebot.com/templates/#other-available-fields, typically
packageName
ordepName
Possible improvements
depName/orange-cloudfoundry/k3s-packages-boshrelease
would becomedepName/orange-cloudfoundry/k3s-packages-boshr...
)How to debug
Details on github issue label max length
I could not find an explicit documentation for this limit in https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels#creating-a-label or https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28#create-a-label
However, github web ui provides an error message displaying the length limit at 50 when attempting to create too labels:
Background:
I'm using labels on PRs to ease mass-managed renovate PRs on our mono repo, and diagnose regressions in our renovate config
Here is the sample package rule we use
Details on the debugging comment within the PR body source
The PR body seems to include a base64 encoded debug string which properly lists the expected labels:
This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/orange-cloudfoundry/paas-templates-renovate-sample). \<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6WyJkYXRhc291cmNlL2dpdGh1Yi10YWdzIiwiZGVwTmFtZS9vcmFuZ2UtY2xvdWRmb3VuZHJ5L2szcy1wYWNrYWdlcy1ib3NocmVsZWFzZSIsImhhc1JlbGVhc2VOb3Rlcy90cnVlIiwibWFuYWdlci9yZWdleCIsIm9yYW5nZS1jbG91ZGZvdW5kcnkvazNzLXBhY2thZ2VzLWJvc2hyZWxlYXNlIiwidHlwZS9ib3NoLXJlbGVhc2UiXX0=-->
Sample debug logs
Beta Was this translation helpful? Give feedback.
All reactions