Skip to content

Commit

Permalink
feat: Added a workflow to list product repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
Fgerthoffert authored Jan 6, 2025
1 parent f818a23 commit 153084b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/delivery-list-repos-cfg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This file contains the json2csv transformation config to create a CSV
// See: https://juanjodiaz.github.io/json2csv/#/parsers/cli
export default {
fields: [
{
label: '',
value: row => {
return row.nameWithOwner + '@' + row.defaultBranchRef.name
}
}
]
}
36 changes: 36 additions & 0 deletions .github/workflows/delivery-list-repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow lists all repositories matching specific topics.
# It is useful to obtain the list of repositories that needs to be updated by the file-sync workflow
# and then copy/paste this list in the configuration
name: Delivery - List repositories

on:
workflow_dispatch:

jobs:
sync-repos-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Get Org Repositories
id: get-repos
uses: fgerthoffert/[email protected]
with:
org: jahia
token: ${{ secrets.GH_ISSUES_PRS_CHORES }}
filter_topics: product,community
filter_operator: OR
filter_ignore_archived: true

- name: Convert the NDJSON to CSV
shell: bash
run: |
npx @json2csv/cli -i ${{ steps.get-repos.outputs.artifact_filepath }} --ndjson --config ${{ github.workspace }}/.github/delivery-list-repos-cfg.js -o repositories.csv
- name: List repositories
shell: bash
run: |
cat repositories.csv | tr -d \"

0 comments on commit 153084b

Please sign in to comment.