From a10e1fb448ffd85e5b6d920918ebba401a8c6467 Mon Sep 17 00:00:00 2001 From: Alessandro Capra Date: Fri, 29 Sep 2023 17:40:16 +0200 Subject: [PATCH] Test CI --- .github/workflows/add-copyright-comment.yml | 30 +++++++++++++++++++++ mobile/src/screens/Withdraw.tsx | 4 --- 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/add-copyright-comment.yml diff --git a/.github/workflows/add-copyright-comment.yml b/.github/workflows/add-copyright-comment.yml new file mode 100644 index 0000000..a90fd99 --- /dev/null +++ b/.github/workflows/add-copyright-comment.yml @@ -0,0 +1,30 @@ +name: Prepend Comments + +on: + push: + branches: + - add-comments-top-file-ci + +jobs: + prepend-comments: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Prepend comments to files + run: | + for file in $(find . -name '*.cs' -o -name '*.ts' -o -name '*.tsx' -o -name '*.js'); do + echo -e "// Copyright 2023 Quantoz Technology B.V. and contributors. Licensed\n// under the Apache License, Version 2.0. See the NOTICE file at the root\n// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0\n\n$(cat $file)" > $file + done + + - name: Commit and push if changed + run: | + git config --global user.name 'GitHub Action' + git config --global user.email 'action@github.com' + git add -A + if [[ $(git status --porcelain) ]]; then + git commit -m "Prepend comments to source files" + git push + fi diff --git a/mobile/src/screens/Withdraw.tsx b/mobile/src/screens/Withdraw.tsx index a8fb073..b355c9a 100644 --- a/mobile/src/screens/Withdraw.tsx +++ b/mobile/src/screens/Withdraw.tsx @@ -1,7 +1,3 @@ -// Copyright 2023 Quantoz Technology B.V. and contributors. Licensed -// under the Apache License, Version 2.0. See the NOTICE file at the root -// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 - import { NativeStackScreenProps } from "@react-navigation/native-stack"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { AxiosError } from "axios";