From e2454b792f6bcb9c92fb7eaac065788b4434e03e Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sat, 6 Jun 2026 18:24:54 +0200 Subject: [PATCH] Consider all active repositories for acknowledgements Fixes https://github.com/eclipse-platform/www.eclipse.org-eclipse/issues/485 --- .../workflows/generateAcknowledgements.yml | 45 +++++++------------ 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/.github/workflows/generateAcknowledgements.yml b/.github/workflows/generateAcknowledgements.yml index ff838fde..1d44aca0 100644 --- a/.github/workflows/generateAcknowledgements.yml +++ b/.github/workflows/generateAcknowledgements.yml @@ -17,23 +17,10 @@ jobs: contents: write pull-requests: write steps: - - name: Checkout Eclipse-Platform Releng Aggregator - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - repository: eclipse-platform/eclipse.platform.releng.aggregator - ref: master - path: eclipse.platform.releng.aggregator - name: Checkout website uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: path: website - - name: Collect Eclipse TLP repositories - id: collect-repos - working-directory: eclipse.platform.releng.aggregator - run: | - repos=$(git config --file .gitmodules --get-regexp '\.url$' | awk '{print $2}' | tr '\n' ' ') - echo "repos: ${repos}" - echo "repos=${repos}" >> "$GITHUB_OUTPUT" - name: Collect contributors uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 id: collect-contributors @@ -53,22 +40,24 @@ jobs: // ---------------------------------------------- // Collect all repositories // ---------------------------------------------- - const submoduleURLs = '${{ steps.collect-repos.outputs.repos }}'.trim() - console.log("Repo list is: " + submoduleURLs) - const ghBaseURL = 'https://github.com/' - const gitSuffix = '.git' - const allRepos = submoduleURLs.split(' ').map(url => { - if (!url.startsWith(ghBaseURL) || !url.endsWith(gitSuffix)) { - core.error('Unsupported repository URL format: ' + url) - throw new Error('Unsupported repository URL format: ' + url) - } - const repo = url.substring(ghBaseURL.length, url.length - gitSuffix.length) - if (repo.split('/').length != 2) { - throw new Error('Unsupported repository URL format: ' + url) + const organizations = ['eclipse-platform', 'eclipse-equinox', 'eclipse-jdt', 'eclipse-pde'] + const ignoredRepos = new Set(['.github', '.eclipsefdn']) + const allRepos = [] + for (const orga of organizations) { + // https://octokit.github.io/rest.js/v22/#repos-list-for-org + // About pagination, see https://github.com/octokit/octokit.js#pagination + let responseIterator = github.paginate.iterator(github.rest.repos.listForOrg, { + org: orga, type: 'public', + }) + for await (const { data: repos } of responseIterator) { // iterate through each response + for (const repo of repos) { + if (repo.archived || ignoredRepos.has(repo.name)) { + continue + } + allRepos.push(repo.full_name) + } } - return repo - }) - allRepos.unshift('eclipse-platform/eclipse.platform.releng.aggregator') + } console.log('All repositories: ' + allRepos) // ----------------------------------------------