list closed milestones too (#30) #65162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Synchronize milestones | |
name: sync | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: {} | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
env: | |
INPUT_READ_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
INPUT_WRITE_TOKEN: ${{ secrets.CHE_BOT_TOKEN }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: synchronize | |
run: | | |
yarn | |
yarn run compile | |
node dist/entrypoint.js | |
# check results | |
python -m ensurepip --upgrade; pip install yq jq | |
curl -sSLkO https://raw.githubusercontent.com/eclipse/che/main/.repositories.yaml | |
for d in $(yq -r '.[][].url' .repositories.yaml | sed -r -e "s#https://github.com/##" -e "s#/\$##"); do \ | |
echo; echo $d; \ | |
gh api repos/${d}/milestones?state=all\&sort=\&per_page=5\&direction=desc --jq '.[]|(.title +"\t"+ .state)'; \ | |
done |