Skip to content

Poll for Git Mastery problem sets #4

Poll for Git Mastery problem sets

Poll for Git Mastery problem sets #4

Workflow file for this run

name: Poll for Git Mastery problem sets
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * *"
jobs:
poll:
runs-on: ubuntu-latest
steps:
- name: Fetch all
uses: actions/github-script@v7
with:
github-token: ${{ secrets.ORG_PAT }}
script: |
const repos = await github.paginate(github.rest.search.repos, {
q: "topic:problem-set org:git-mastery",
})
const repoGroups = new Map();
for (const repo of repos) {
for (const topic of repo.topics) {
if (topic !== "problem-set") {
if (!repoGroups.has(topic)) {
repoGroups.set(topic, [])
}
repoGroups.get(topic).push(repo)
}
}
}
console.log(repoGroups)