Changeset 111073 in spip-zone


Ignore:
Timestamp:
Jul 10, 2018, 7:12:33 AM (5 months ago)
Author:
cam.lafit@…
Message:

Traiter l'affectation à plusieurs organisations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _outils_/svn2git/trunk/create_user_gitea.sh

    r111072 r111073  
    55
    66. create_user_gitea.conf
     7GITEA_ORG_LIST=()
    78
    8 #Obtenir l'identifiant de l'organisation
    9 GITEA_ORGA_ID=$(curl \
     9#Obtenir les identifiants pour chaque organisation
     10IFS=':' read -ra ORGAS <<< "$GITEA_ORGA"
     11for orga in "${ORGAS[@]}"; do
     12    GITEA_ORGA_ID=$(curl \
    1013    --silent \
    1114    -X GET \
    1215    -H "Authorization: token $GITEA_TOKEN" \
    13     $GITEA_HOST/api/v1/orgs/$GITEA_ORGA \
     16    $GITEA_HOST/api/v1/orgs/$orga \
    1417    | jq -r ".id"
    15 )
     18    )
    1619
    17 GITEA_ORGA_TEAM_ID=$(curl\
     20    GITEA_ORGA_TEAM_ID=$(curl\
    1821    --silent \
    1922    -X GET \
    2023    -H "Authorization: token $GITEA_TOKEN" \
    21     $GITEA_HOST/api/v1/orgs/$GITEA_ORGA/teams \
     24    $GITEA_HOST/api/v1/orgs/$orga/teams \
    2225    | jq '.[] | select(.permission == "write") | .id'
    23 )
     26    )
     27
     28    GITEA_ORG_LIST+=("$orga:$GITEA_ORGA_ID:$GITEA_ORGA_TEAM_ID")
     29done
    2430
    2531while read row ; do
Note: See TracChangeset for help on using the changeset viewer.