diff --git a/.github/workflows/add-copyright-comment.yml b/.github/workflows/add-copyright-comment.yml new file mode 100644 index 0000000..e7a0b01 --- /dev/null +++ b/.github/workflows/add-copyright-comment.yml @@ -0,0 +1,34 @@ +name: Add Headers to Source Files + +on: + push: + branches: + - add-comments-top-file-ci + +jobs: + add-headers: + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Check and Prepend Comments + run: | + for file in $(find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.cs" \)); do + if ! grep -q "Copyright 2023 Quantoz Technology B.V. and contributors." "$file"; then + 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 + fi + done + + - name: Commit and Push Changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add -A + if [[ $(git diff --cached) ]]; then + git commit -m "Add headers to source files" + git push + else + echo "No changes to commit" + 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";