This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git
The following commit(s) were added to refs/heads/main by this push:
new d4cfaea Read every label in the labels sync, not only the first 30
d4cfaea is described below
commit d4cfaeae2a83f28b9bde7cc864c2611dea76ab45
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Tue Nov 3 22:04:11 2026 +0000
Read every label in the labels sync, not only the first 30
listLabelsForRepo returns one page of 30. Repositories with more labels
reported existing ones as missing, and a create-missing run would fail on them
with 422.
---
.github/workflows/labels-sync.yml | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/labels-sync.yml
b/.github/workflows/labels-sync.yml
index d69879f..1bfc3d0 100644
--- a/.github/workflows/labels-sync.yml
+++ b/.github/workflows/labels-sync.yml
@@ -92,16 +92,17 @@ jobs:
console.log('Labels to update:');
console.log(labels);
- const currentLabels = await github.rest.issues.listLabelsForRepo({
+ const currentLabels = await
github.paginate(github.rest.issues.listLabelsForRepo, {
owner: process.env.OWNER,
- repo: process.env.REPO
+ repo: process.env.REPO,
+ per_page: 100
});
console.log('Current project labels:');
- console.log(currentLabels.data);
+ console.log(currentLabels);
for (const label of labels) {
- const currentLabel = currentLabels.data.find(({name}) => name ==
label.name);
+ const currentLabel = currentLabels.find(({name}) => name ==
label.name);
console.log('Label:');
console.log(label);