Merge pull request 'kdjdjdjdjdjdjd' (#150) from develop/16 into master

Reviewed-on: #150
This commit is contained in:
giles 2023-10-23 11:29:01 +00:00
commit 0bc339c089
3 changed files with 73 additions and 7 deletions

View File

@ -28,7 +28,7 @@ jobs:
firstString=${{ github.ref_name }}
secondString="develop"
echo ::set-env name=DEVELOPMENT_BRANCH::${firstString/build\//"$secondString"\/}
- name: GIT commit diff
- name: commit
env:
CI_COMMIT_MESSAGE: converted to yml for review.
CI_COMMIT_AUTHOR: Continuous Integration
@ -37,4 +37,49 @@ jobs:
git config --global user.email "username@users.noreply.github.com"
git add -A
git commit -a -m "${{ github.ref_name }} -> ${{ env.DEVELOPMENT_BRANCH }}"
ggit diff HEAD origin/${{ env.DEVELOPMENT_BRANCH }}
- name: status
env:
CI_COMMIT_MESSAGE: converted to yml for review.
CI_COMMIT_AUTHOR: Continuous Integration
run: |
git branch -r
echo $(git branch -r | grep -Fx " origin/${{ env.DEVELOPMENT_BRANCH }}" | wc -c)
- name: diff
env:
CI_COMMIT_MESSAGE: converted to yml for review.
CI_COMMIT_AUTHOR: Continuous Integration
run: |
if [[ $(git branch -r | grep -Fx " origin/${{ env.DEVELOPMENT_BRANCH }}" | wc -c) -eq 0 ]]; then
echo no development branch so pushing
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea;
chmod +x ./tea;
./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }};
if [[ $(./tea pr ls -f=base,head | grep "| master | ${{ env.DEVELOPMENT_BRANCH }} |" | head -c1 | wc -c) -eq 0 ]]; then
./tea pr c --base=master --head=${{ env.DEVELOPMENT_BRANCH }} --description="development pull request" -t="WIP: ${{ github.event.head_commit.message }}"
fi
echo 'pushed new branch and created pr';
else
if [[ $(git diff origin/${{ env.DEVELOPMENT_BRANCH }} | wc -c) -ne 0 ]]; then
git clone ${{ github.serverUrl }}/${{ github.repository }} ../cloned
git -C ../cloned fetch origin #--depth=1
git -C ../cloned branch -r
git -C ../cloned checkout $DEVELOPMENT_BRANCH || git -C ../cloned checkout -b $DEVELOPMENT_BRANCH
mv ../cloned/.git ..
rm -rf ../cloned
cp -r . ../cloned
rm -rf ../cloned/.git
mv ../.git ../cloned
mv .git/config ../cloned/.git
rm -r ./*
rm -r .git
mv ../cloned/* .
mv ../cloned/.git .
git status
git add -A
git commit -a -m "${{ github.ref_name }} -> ${{ env.DEVELOPMENT_BRANCH }}"
git push origin HEAD:${{ env.DEVELOPMENT_BRANCH }};
else
echo 'no changes so no push'
fi;
fi

View File

@ -25,10 +25,10 @@ jobs:
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea
chmod +x ./tea
./tea login add -n=this --url=${{ github.server_url}} -t=${{ secrets.BOT_TOKEN }}
./tea pr ls -f=base,head,index
echo ::set-env name=PR::$(./tea pr ls -f=base,head,index | grep "| master | ${{ github.ref_name }} |" | tr -d ' ' | tr "|" "\n" | head -n 4 | tail -1)
pr=$(./tea pr ls -f=base,head,index -o csv | grep "\"master\",\"${{ github.ref_name }}\"" | tr -d ' ' | tr "," "\n" | head -n 4 | tail -1)
export PR="${pr//[\"\'\`]/}"
echo ::set-env name=PR::$PR
rm ./tea
echo PR: $PR
- run: git fetch
- name: get build branch name
run: |
@ -46,8 +46,29 @@ jobs:
git commit -a -m "${{ github.ref_name }} -> ${{ env.BUILD_BRANCH }} "
git checkout -b ${{ env.BUILD_BRANCH }}
git merge --squash ${{ github.ref_name }}
git push -f origin HEAD:${{ env.BUILD_BRANCH }}
if [[ $(git diff origin/${{ env.BUILD_BRANCH }} | wc -c) -ne 0 ]]; then
git clone ${{ github.serverUrl }}/${{ github.repository }} ../cloned
git -C ../cloned fetch origin #--depth=1
git -C ../cloned branch -r
git -C ../cloned checkout $BUILD_BRANCH || git -C ../cloned checkout -b $BUILD_BRANCH
mv ../cloned/.git ..
rm -rf ../cloned
cp -r . ../cloned
rm -rf ../cloned/.git
mv ../.git ../cloned
mv .git/config ../cloned/.git
rm -r ./*
rm -r .git
mv ../cloned/* .
mv ../cloned/.git .
git status
git add -A
git commit -a -m "${{ github.ref_name }} -> ${{ env.BUILD_BRANCH }} "
git push origin HEAD:${{ env.BUILD_BRANCH }}
else
echo 'no changes so no push'
fi;
- name: make pull request comment
run: |
curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea

View File

@ -135,7 +135,7 @@
- Required: '0'
- ApproveSignatureTemplateName: null
- RevertSignatureTemplateName: null
- Description: Confirmation by the author of the recipe thatcdcscsvdsvdsvsdit is ready for redcdview.s...gfhhh....
- Description: Confirmation by the author of the recipe thatcdcscsvdsvdsvsxsxsdit is ready for v vredcdview.s...gfhhh....
- RecipeApprovalStep:
- Name: Review Recipe
- Id: '-3'