Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 17 additions & 28 deletions .github/workflows/generateAcknowledgements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

// ----------------------------------------------
Expand Down