Skip to content
Merged
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
8 changes: 5 additions & 3 deletions .github/workflows/pr-sort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,12 @@ jobs:
# This check avoids a bug in all-contributors-cli (issue #371) where
# adding an existing contribution type replaces all existing contributions
if [[ -n "${{ steps.vars.outputs.contributor }}" ]]; then
pixi run install
pixi run add ${{ steps.vars.outputs.contributor }} conference
CONTRIBUTOR="${{ steps.vars.outputs.contributor }}"
# Check if contributor already has "conference" contribution (the overlap triggers the bug)
# Check if contributor already has "conference" contribution (the overlap triggers the bug).
# IMPORTANT: there must be NO unconditional `all-contributors add` before this guard.
# all-contributors-cli replaces a contributor's whole contributions array when re-adding an
# existing type, so re-adding "conference" to someone who already has it strips their other
# contributions. The guard below is the ONLY add path: skip when "conference" is already present.
if ! jq -e --arg login "$CONTRIBUTOR" '.contributors[] | select(.login == $login) | .contributions | index("conference")' .all-contributorsrc > /dev/null 2>&1; then
echo "Adding conference contribution for: $CONTRIBUTOR"
pixi run install
Expand Down