chore(workflow): update updatemirror to add contributors list to REAdme#43
chore(workflow): update updatemirror to add contributors list to REAdme#43alphaleadership wants to merge 1 commit intoEuro-Office:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e518b51229
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| git add "$README_FILE" | ||
| if ! git diff --cached --quiet; then | ||
| git commit -m "chore: update contributors list in $README_FILE" | ||
| git push origin HEAD |
There was a problem hiding this comment.
Stop pushing README commits to mirrored default branches
In build you now commit and push README changes directly to each mirrored repo (git push origin HEAD), but the same job still starts by mirroring upstream with a non-force git push eurooffice --all. After the first run that creates a README-only commit, the next run will hit non-fast-forward rejections for that branch because upstream does not contain that commit, causing the mirror step to fail for affected repos. This makes the scheduled mirror workflow self-breaking unless these README commits are isolated from mirrored refs (or reconciled before mirroring).
Useful? React with 👍 / 👎.
| echo "## Contributors" | ||
| echo "A huge thank you to all the contributors of the upstream repository!" | ||
| echo "" | ||
| gh api "repos/${{ matrix.repo }}/contributors" --jq '.[] | select(.type != "Bot") | "- [" + .login + "](" + .html_url + ")"' |
There was a problem hiding this comment.
Paginate contributor API requests before writing README
Both contributor list updates call gh api .../contributors without pagination, so only the first page is processed; the gh api manual states that --paginate is required to fetch all pages. As a result, repositories with more than one page of non-bot contributors will have incomplete contributor sections, which undermines the stated goal of maintaining a full contributor list.
Useful? React with 👍 / 👎.
…ME.md