From f27d6555077c70efb052f00fb4b447d7caab4b33 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Sun, 5 Jan 2025 14:07:51 +0530 Subject: [PATCH 01/30] #2970:autodoc-generate --- .eslintrc.json | 3 +- .github/workflows/pull-request.yml | 94 +++++++++++++++++++++++++++++- 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index de93fb465f..9e62a6a8e8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -152,6 +152,7 @@ "docs/docusaurus.config.ts", "docs/sidebars.ts", "docs/src/**", - "docs/blog/**" + "docs/blog/**", + "docs/docs/**" ] } diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c42b0d19f6..40ea725b9d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -502,4 +502,96 @@ jobs: fi sleep $retry_delay fi - done \ No newline at end of file + done + + generate-docs: + name: Generate Auto Documentation + runs-on: ubuntu-latest + needs: [Code-Quality-Checks, Test-Application, Start-App-Without-Docker, Docker-Start-Check] + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required for getting full git history + ref: ${{ github.head_ref }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22.x' + cache: 'npm' + + - name: Install dependencies + run: | + npm ci + npm install -g typedoc typedoc-plugin-markdown + + - name: Create documentation directory + run: | + mkdir -p docs/docs/auto-docs + mkdir -p docs/docs/user-guide + mkdir -p docs/docs/developer-guide/reference + + - name: Generate Documentation + run: | + # Generate the documentation + typedoc \ + --out docs/docs/auto-docs \ + --plugin typedoc-plugin-markdown \ + --theme markdown \ + --tsconfig tsconfig.json \ + --excludePrivate \ + --excludeProtected \ + --excludeExternals \ + --hideGenerator \ + --gitRevision ${{ github.head_ref }} \ + --categorizeByGroup true \ + --entryPointStrategy expand \ + --entryPoints "src/**/*.ts" "src/**/*.tsx" \ + --exclude "**/*.{test,spec,stories}.{ts,tsx}" \ + --exclude "**/__tests__/**" \ + --exclude "**/__mocks__/**" \ + --exclude "**/node_modules/**" \ + --cleanOutputDir true + + - name: Create placeholder documentation + run: | + # Create User Guide placeholder + echo "# User Guide + + This section contains the user guide for Talawa Admin. + " > docs/docs/user-guide/intro.md + + # Create Developer Guide placeholder + echo "# Developer Guide + + This section contains the developer guide for Talawa Admin. + " > docs/docs/developer-guide/intro.md + + # Create Reference placeholder + echo "# API Reference + + This section contains the auto-generated API documentation for Talawa Admin. + " > docs/docs/developer-guide/reference/README.md + + - name: Setup Git Config + run: | + git config user.name "GitHub Actions Bot" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Check and Commit Documentation + run: | + # Check if there are any changes + if [[ -n "$(git status --porcelain)" ]]; then + # Add all changes + git add docs/docs/auto-docs + git add docs/docs/user-guide + git add docs/docs/developer-guide + + # Commit changes + git commit -m "docs: update auto-generated documentation [skip ci]" + + # Push changes + git push origin ${{ github.head_ref }} + else + echo "No changes to commit" + fi From 69ff3e18064f02f408bc0f41d40a5815fcf8138e Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Sun, 5 Jan 2025 15:57:41 +0530 Subject: [PATCH 02/30] #2970:autodoc-generate --- .github/workflows/pull-request.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 40ea725b9d..1eabd4b54a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -512,7 +512,6 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # Required for getting full git history - ref: ${{ github.head_ref }} - name: Setup Node.js uses: actions/setup-node@v4 @@ -543,7 +542,6 @@ jobs: --excludeProtected \ --excludeExternals \ --hideGenerator \ - --gitRevision ${{ github.head_ref }} \ --categorizeByGroup true \ --entryPointStrategy expand \ --entryPoints "src/**/*.ts" "src/**/*.tsx" \ @@ -591,7 +589,7 @@ jobs: git commit -m "docs: update auto-generated documentation [skip ci]" # Push changes - git push origin ${{ github.head_ref }} + git push else echo "No changes to commit" fi From 2184d6c74f372eac2dc297527f4b447924539214 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Sun, 5 Jan 2025 17:28:25 +0530 Subject: [PATCH 03/30] #2970:autodoc-generate --- src/components/CheckIn/TableRow.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/CheckIn/TableRow.tsx b/src/components/CheckIn/TableRow.tsx index b2bd6e11cb..b273dbdd84 100644 --- a/src/components/CheckIn/TableRow.tsx +++ b/src/components/CheckIn/TableRow.tsx @@ -73,7 +73,9 @@ export const TableRow = ({ inputs.push({ name: data.name.trim() }); const pdf = await generate({ template: tagTemplate, inputs }); // istanbul ignore next - const blob = new Blob([pdf.buffer], { type: 'application/pdf' }); + // Convert ArrayBuffer to Uint8Array before creating Blob + const uint8Array = new Uint8Array(pdf.buffer); + const blob = new Blob([uint8Array], { type: 'application/pdf' }); // istanbul ignore next const url = URL.createObjectURL(blob); // istanbul ignore next From 7ab86e2c8091900e71935f98f64b2e964f4644b2 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Sun, 5 Jan 2025 17:40:36 +0530 Subject: [PATCH 04/30] #2970:autodoc-generate --- src/components/CheckIn/TableRow.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/CheckIn/TableRow.tsx b/src/components/CheckIn/TableRow.tsx index b273dbdd84..6c0e6a4ff3 100644 --- a/src/components/CheckIn/TableRow.tsx +++ b/src/components/CheckIn/TableRow.tsx @@ -72,15 +72,12 @@ export const TableRow = ({ } inputs.push({ name: data.name.trim() }); const pdf = await generate({ template: tagTemplate, inputs }); - // istanbul ignore next + // Convert ArrayBuffer to Uint8Array before creating Blob const uint8Array = new Uint8Array(pdf.buffer); const blob = new Blob([uint8Array], { type: 'application/pdf' }); - // istanbul ignore next const url = URL.createObjectURL(blob); - // istanbul ignore next window.open(url); - // istanbul ignore next toast.success('PDF generated successfully!'); } catch (error: unknown) { const errorMessage = From a1d2a8db3e78e40f8b863455deea039ab3096eae Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Sun, 5 Jan 2025 19:01:31 +0530 Subject: [PATCH 05/30] #2970:autodoc-generate-talawa-Admin --- .gitignore | Bin 456 -> 531 bytes .husky/pre-commit | 10 ---------- 2 files changed, 10 deletions(-) delete mode 100755 .husky/pre-commit diff --git a/.gitignore b/.gitignore index 80c2b97cd9a00775d0a605178cf60eb19c7e88ee..31cea241f2c0506fbf76886191852cde8372916a 100644 GIT binary patch literal 531 zcmZWlyKciU4CE|8{~#b+fXI8d0-ZB7Q>Q?d7+a0?fJ7zD-q#kK?PirZp*sNI5 zY&ahY%L%#u%EQ&i>-%1cn<-H*$)2UiF^64;`ewqiwmZxi9Y*W1N-@Ob@EDS7yq`nO zEmHJXe{$US5msV}QrL9CVkR6qbjaaakPEk4@+tCwvH8WVeDKxsthdAQKl5)UEPkdkeMEos!&{A}V4#zezHEmb-{|PK5m7j|43BPi|T2)1A?Du!T zDtw<5I?tL_!Nm}|_2w+sJ2d>e)P4Xdwz^*XxnPC{70z&j0WuUo*nx!vfjkY428`bB1Q>6vz^7tJMqA*=hd1lHEsuE&`9d2dRU&0Agm& z^+~B2KFi7RybRK$pmbqpJgRb2OvT0NG`e1jF%=O~fzU%*Sp3LhlO@q%M}lYF)W|3! zTKBE37H`k5XS(YWrBCLAa?Ih>k-Y2R`=~`mw1~!`l8VXV8j@YwVN$ZSQ-9=p?Y)f3 z%@>)pqUZ^#A&XXZF_$)G*riBnSe&<=46YiIFPH0uTL6-X>-Kav+V9X}g-H0Dk^x%^gG*~o|Axe&7~;tnql`(CFv|Q N$+h;Vbd>d$=?f9KoO%EN diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 77ecddae25..0000000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -npm run format:fix -# npm run lint:fix -npm run lint-staged -npm run typecheck -npm run update:toc - -git add . From d845f31a92402b4c83b20cdf817dfd805ba08354 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Sun, 5 Jan 2025 19:52:20 +0530 Subject: [PATCH 06/30] #2970:autodoc-generate-talawa-Admin --- .github/workflows/pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3121820269..1012f9c441 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -504,6 +504,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # Required for getting full git history + ref: ${{ github.event.pull_request.head.ref }} - name: Setup Node.js uses: actions/setup-node@v4 @@ -581,7 +582,7 @@ jobs: git commit -m "docs: update auto-generated documentation [skip ci]" # Push changes - git push + git push origin HEAD:${{ github.event.pull_request.head.ref }} else echo "No changes to commit" fi From 8d621fed6ff7d740afcde2678170dbea7ed638f8 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Sun, 5 Jan 2025 20:19:38 +0530 Subject: [PATCH 07/30] #2970:autodoc-generate-talawa-Admin --- .github/workflows/pull-request.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 1012f9c441..3121820269 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -504,7 +504,6 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # Required for getting full git history - ref: ${{ github.event.pull_request.head.ref }} - name: Setup Node.js uses: actions/setup-node@v4 @@ -582,7 +581,7 @@ jobs: git commit -m "docs: update auto-generated documentation [skip ci]" # Push changes - git push origin HEAD:${{ github.event.pull_request.head.ref }} + git push else echo "No changes to commit" fi From d3c57fee725ff5bf769c11018f602cc3394119f5 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 15:20:04 +0530 Subject: [PATCH 08/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 20 +++++++++++++------ docs/docs/auto-docs/.gitignore | 0 .../docs/developer-guide/reference/.gitignore | 0 docs/docs/user-guide/.gitignore | 0 4 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 docs/docs/auto-docs/.gitignore create mode 100644 docs/docs/developer-guide/reference/.gitignore create mode 100644 docs/docs/user-guide/.gitignore diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3121820269..5093a6abc8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -516,12 +516,6 @@ jobs: npm ci npm install -g typedoc typedoc-plugin-markdown - - name: Create documentation directory - run: | - mkdir -p docs/docs/auto-docs - mkdir -p docs/docs/user-guide - mkdir -p docs/docs/developer-guide/reference - - name: Generate Documentation run: | # Generate the documentation @@ -567,6 +561,20 @@ jobs: run: | git config user.name "GitHub Actions Bot" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Debug GitHub Variables + run: | + echo "GitHub REF: ${{ github.ref }}" + echo "GitHub HEAD REF: ${{ github.head_ref }}" + echo "GitHub BASE REF: ${{ github.base_ref }}" + echo "GitHub REF NAME: ${{ github.ref_name }}" + echo "GitHub EVENT NAME: ${{ github.event_name }}" + echo "Current branch:" + git branch --show-current + echo "All branches:" + git branch -a + echo "Git status:" + git status - name: Check and Commit Documentation run: | diff --git a/docs/docs/auto-docs/.gitignore b/docs/docs/auto-docs/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/docs/developer-guide/reference/.gitignore b/docs/docs/developer-guide/reference/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/docs/user-guide/.gitignore b/docs/docs/user-guide/.gitignore new file mode 100644 index 0000000000..e69de29bb2 From 7437dbd47cac42a66375cd58512142b15a1a1625 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 15:48:00 +0530 Subject: [PATCH 09/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 5093a6abc8..1fafeade54 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -578,18 +578,19 @@ jobs: - name: Check and Commit Documentation run: | - # Check if there are any changes + # Checkout the PR branch using the dynamic reference + git fetch origin ${{ github.head_ref }} + git checkout ${{ github.head_ref }} + + # Add all the generated documentation files + git add docs/docs/auto-docs/ + git add docs/docs/developer-guide/ + git add docs/docs/user-guide/ + + # Commit if there are changes if [[ -n "$(git status --porcelain)" ]]; then - # Add all changes - git add docs/docs/auto-docs - git add docs/docs/user-guide - git add docs/docs/developer-guide - - # Commit changes git commit -m "docs: update auto-generated documentation [skip ci]" - - # Push changes - git push + git push origin ${{ github.head_ref }} else echo "No changes to commit" fi From 5d3da67c965eedc38d7f6c852c00c71f580bd2f1 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 16:24:37 +0530 Subject: [PATCH 10/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 1fafeade54..455d675e26 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -503,7 +503,9 @@ jobs: steps: - uses: actions/checkout@v4 with: + ref: ${{ github.head_ref }} fetch-depth: 0 # Required for getting full git history + token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Node.js uses: actions/setup-node@v4 @@ -590,7 +592,7 @@ jobs: # Commit if there are changes if [[ -n "$(git status --porcelain)" ]]; then git commit -m "docs: update auto-generated documentation [skip ci]" - git push origin ${{ github.head_ref }} + git push origin HEAD:${{ github.head_ref }} else echo "No changes to commit" fi From 923d293e5cbf7492eb865518c402c9745a1cb15b Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 17:36:18 +0530 Subject: [PATCH 11/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 455d675e26..4d4469bf95 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -501,6 +501,20 @@ jobs: runs-on: ubuntu-latest needs: [Code-Quality-Checks, Test-Application, Start-App-Without-Docker, Docker-Start-Check] steps: + - name: Debug GitHub Variables + run: | + echo "GitHub REF: ${{ github.ref }}" + echo "GitHub HEAD REF: ${{ github.head_ref }}" + echo "GitHub BASE REF: ${{ github.base_ref }}" + echo "GitHub REF NAME: ${{ github.ref_name }}" + echo "GitHub EVENT NAME: ${{ github.event_name }}" + echo "Current branch:" + git branch --show-current + echo "All branches:" + git branch -a + echo "Git status:" + git status + - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} @@ -563,20 +577,6 @@ jobs: run: | git config user.name "GitHub Actions Bot" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - - - name: Debug GitHub Variables - run: | - echo "GitHub REF: ${{ github.ref }}" - echo "GitHub HEAD REF: ${{ github.head_ref }}" - echo "GitHub BASE REF: ${{ github.base_ref }}" - echo "GitHub REF NAME: ${{ github.ref_name }}" - echo "GitHub EVENT NAME: ${{ github.event_name }}" - echo "Current branch:" - git branch --show-current - echo "All branches:" - git branch -a - echo "Git status:" - git status - name: Check and Commit Documentation run: | From 61766d986df14980bfade109055c7d439e5544dd Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 17:56:08 +0530 Subject: [PATCH 12/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4d4469bf95..b4e9060b91 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -580,8 +580,10 @@ jobs: - name: Check and Commit Documentation run: | + # Fetch all branches + git fetch --all + # Checkout the PR branch using the dynamic reference - git fetch origin ${{ github.head_ref }} git checkout ${{ github.head_ref }} # Add all the generated documentation files From 24753fc33dc32036e703830a3832babc56e2e9e4 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 18:18:03 +0530 Subject: [PATCH 13/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b4e9060b91..0cd28cd042 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -582,8 +582,9 @@ jobs: run: | # Fetch all branches git fetch --all - + # Checkout the PR branch using the dynamic reference + git fetch origin ${{ github.head_ref }} git checkout ${{ github.head_ref }} # Add all the generated documentation files From 070146cd0508ec10af77351d3a07423b51d54075 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 19:18:48 +0530 Subject: [PATCH 14/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0cd28cd042..0aaf88cb22 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -501,20 +501,6 @@ jobs: runs-on: ubuntu-latest needs: [Code-Quality-Checks, Test-Application, Start-App-Without-Docker, Docker-Start-Check] steps: - - name: Debug GitHub Variables - run: | - echo "GitHub REF: ${{ github.ref }}" - echo "GitHub HEAD REF: ${{ github.head_ref }}" - echo "GitHub BASE REF: ${{ github.base_ref }}" - echo "GitHub REF NAME: ${{ github.ref_name }}" - echo "GitHub EVENT NAME: ${{ github.event_name }}" - echo "Current branch:" - git branch --show-current - echo "All branches:" - git branch -a - echo "Git status:" - git status - - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} @@ -577,6 +563,20 @@ jobs: run: | git config user.name "GitHub Actions Bot" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Debug GitHub Variables + run: | + echo "GitHub REF: ${{ github.ref }}" + echo "GitHub HEAD REF: ${{ github.head_ref }}" + echo "GitHub BASE REF: ${{ github.base_ref }}" + echo "GitHub REF NAME: ${{ github.ref_name }}" + echo "GitHub EVENT NAME: ${{ github.event_name }}" + echo "Current branch:" + git branch --show-current + echo "All branches:" + git branch -a + echo "Git status:" + git status - name: Check and Commit Documentation run: | From 81fdf932f6bbed466ec5d1b63ddfd511016fe688 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 21:31:56 +0530 Subject: [PATCH 15/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0aaf88cb22..9a76fc78fa 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -503,7 +503,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} + ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 # Required for getting full git history token: ${{ secrets.GITHUB_TOKEN }} @@ -580,13 +580,6 @@ jobs: - name: Check and Commit Documentation run: | - # Fetch all branches - git fetch --all - - # Checkout the PR branch using the dynamic reference - git fetch origin ${{ github.head_ref }} - git checkout ${{ github.head_ref }} - # Add all the generated documentation files git add docs/docs/auto-docs/ git add docs/docs/developer-guide/ From ad123b0c3c1f11bef5123eb56d9abdfd8b84bb0a Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 21:32:41 +0530 Subject: [PATCH 16/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 9a76fc78fa..30fd2dfce5 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -588,7 +588,7 @@ jobs: # Commit if there are changes if [[ -n "$(git status --porcelain)" ]]; then git commit -m "docs: update auto-generated documentation [skip ci]" - git push origin HEAD:${{ github.head_ref }} + git push origin HEAD: ${{ github.event.pull_request.head.ref }} else echo "No changes to commit" fi From 1ba51b58b332ece0a8b6670feb29925537fea5ff Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 22:01:39 +0530 Subject: [PATCH 17/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 30fd2dfce5..fa46ecc5a6 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -503,7 +503,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.ref }} + ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 # Required for getting full git history token: ${{ secrets.GITHUB_TOKEN }} @@ -579,7 +579,11 @@ jobs: git status - name: Check and Commit Documentation + env: + PR_BRANCH: ${{ github.event.pull_request.head.ref }} + PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} run: | + git remote add fork https://github.com/$PR_REPO.git # Add all the generated documentation files git add docs/docs/auto-docs/ git add docs/docs/developer-guide/ @@ -588,7 +592,7 @@ jobs: # Commit if there are changes if [[ -n "$(git status --porcelain)" ]]; then git commit -m "docs: update auto-generated documentation [skip ci]" - git push origin HEAD: ${{ github.event.pull_request.head.ref }} + git push fork HEAD:$PR_BRANCH else echo "No changes to commit" fi From 12ea144c6e8b140920759c88c8b43dfc1b90ebf8 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 22:21:31 +0530 Subject: [PATCH 18/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index fa46ecc5a6..96ba351c31 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -503,7 +503,8 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.sha }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 # Required for getting full git history token: ${{ secrets.GITHUB_TOKEN }} @@ -583,16 +584,14 @@ jobs: PR_BRANCH: ${{ github.event.pull_request.head.ref }} PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} run: | - git remote add fork https://github.com/$PR_REPO.git - # Add all the generated documentation files + git fetch origin ${{ github.head_ref }} + git checkout ${{ github.head_ref }} git add docs/docs/auto-docs/ git add docs/docs/developer-guide/ git add docs/docs/user-guide/ - - # Commit if there are changes if [[ -n "$(git status --porcelain)" ]]; then git commit -m "docs: update auto-generated documentation [skip ci]" - git push fork HEAD:$PR_BRANCH + git push origin HEAD:${{ github.head_ref }} else echo "No changes to commit" fi From fd7b82e4e4a0587cfdef289e8c7aba6174f1b79e Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Mon, 6 Jan 2025 23:54:30 +0530 Subject: [PATCH 19/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 96ba351c31..fc54c526f4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -583,15 +583,17 @@ jobs: env: PR_BRANCH: ${{ github.event.pull_request.head.ref }} PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} + PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} run: | - git fetch origin ${{ github.head_ref }} - git checkout ${{ github.head_ref }} + # Use PAT for pushing + git fetch origin ${{ env.PR_BRANCH }} + git checkout ${{ env.PR_BRANCH }} git add docs/docs/auto-docs/ git add docs/docs/developer-guide/ git add docs/docs/user-guide/ if [[ -n "$(git status --porcelain)" ]]; then git commit -m "docs: update auto-generated documentation [skip ci]" - git push origin HEAD:${{ github.head_ref }} + git push https://${{ env.PERSONAL_ACCESS_TOKEN }}@github.com/${{ env.PR_REPO }} HEAD:${{ env.PR_BRANCH }} else echo "No changes to commit" fi From a39f982e79b155a28159a074b5ecf1361bd509da Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Tue, 7 Jan 2025 01:11:17 +0530 Subject: [PATCH 20/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index fc54c526f4..2d0eb80613 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -593,7 +593,8 @@ jobs: git add docs/docs/user-guide/ if [[ -n "$(git status --porcelain)" ]]; then git commit -m "docs: update auto-generated documentation [skip ci]" - git push https://${{ env.PERSONAL_ACCESS_TOKEN }}@github.com/${{ env.PR_REPO }} HEAD:${{ env.PR_BRANCH }} + git remote set-url origin https://x-access-token:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${{ env.PR_REPO }}.git + git push origin HEAD:${{ env.PR_BRANCH }} else echo "No changes to commit" fi From 0a5ab4316b1bcc62e46d4a5a829d1cc368a30c79 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Tue, 7 Jan 2025 01:30:12 +0530 Subject: [PATCH 21/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 2d0eb80613..063d3e713e 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -583,9 +583,10 @@ jobs: env: PR_BRANCH: ${{ github.event.pull_request.head.ref }} PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} - PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} run: | # Use PAT for pushing + git remote set-url origin https://$GITHUB_TOKEN@github.com/${{ github.event.pull_request.head.repo.full_name }}.git git fetch origin ${{ env.PR_BRANCH }} git checkout ${{ env.PR_BRANCH }} git add docs/docs/auto-docs/ @@ -593,7 +594,6 @@ jobs: git add docs/docs/user-guide/ if [[ -n "$(git status --porcelain)" ]]; then git commit -m "docs: update auto-generated documentation [skip ci]" - git remote set-url origin https://x-access-token:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${{ env.PR_REPO }}.git git push origin HEAD:${{ env.PR_BRANCH }} else echo "No changes to commit" From 30811a54306ff63127c6061c4c2f4a7be70895e4 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Tue, 7 Jan 2025 01:48:17 +0530 Subject: [PATCH 22/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 063d3e713e..96ba351c31 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -583,18 +583,15 @@ jobs: env: PR_BRANCH: ${{ github.event.pull_request.head.ref }} PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} - GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} run: | - # Use PAT for pushing - git remote set-url origin https://$GITHUB_TOKEN@github.com/${{ github.event.pull_request.head.repo.full_name }}.git - git fetch origin ${{ env.PR_BRANCH }} - git checkout ${{ env.PR_BRANCH }} + git fetch origin ${{ github.head_ref }} + git checkout ${{ github.head_ref }} git add docs/docs/auto-docs/ git add docs/docs/developer-guide/ git add docs/docs/user-guide/ if [[ -n "$(git status --porcelain)" ]]; then git commit -m "docs: update auto-generated documentation [skip ci]" - git push origin HEAD:${{ env.PR_BRANCH }} + git push origin HEAD:${{ github.head_ref }} else echo "No changes to commit" fi From ab2eee971053c0e972c1b16d86dc9949188e40fa Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Tue, 7 Jan 2025 07:04:26 +0530 Subject: [PATCH 23/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 96ba351c31..bccd281043 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -583,15 +583,21 @@ jobs: env: PR_BRANCH: ${{ github.event.pull_request.head.ref }} PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} + GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} run: | - git fetch origin ${{ github.head_ref }} - git checkout ${{ github.head_ref }} + set -e # Exit on error + git remote set-url origin "https://$GITHUB_TOKEN@github.com/$PR_REPO.git" + git fetch origin "$PR_BRANCH" + git checkout "$PR_BRANCH" git add docs/docs/auto-docs/ git add docs/docs/developer-guide/ git add docs/docs/user-guide/ if [[ -n "$(git status --porcelain)" ]]; then git commit -m "docs: update auto-generated documentation [skip ci]" - git push origin HEAD:${{ github.head_ref }} + if ! git push origin "HEAD:$PR_BRANCH"; then + echo "Failed to push changes" + exit 1 + fi else echo "No changes to commit" fi From 061a3a0d17729b23568a12688d1d5b6691bb713f Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Tue, 7 Jan 2025 07:44:24 +0530 Subject: [PATCH 24/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index bccd281043..5b849f566c 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -506,7 +506,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 # Required for getting full git history - token: ${{ secrets.GITHUB_TOKEN }} + PAT: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - name: Setup Node.js uses: actions/setup-node@v4 @@ -562,8 +562,8 @@ jobs: - name: Setup Git Config run: | - git config user.name "GitHub Actions Bot" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" - name: Debug GitHub Variables run: | @@ -583,21 +583,19 @@ jobs: env: PR_BRANCH: ${{ github.event.pull_request.head.ref }} PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} - GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + PAT: ${{ secrets.PERSONAL_ACCESS_TOKEN }} run: | - set -e # Exit on error - git remote set-url origin "https://$GITHUB_TOKEN@github.com/$PR_REPO.git" - git fetch origin "$PR_BRANCH" - git checkout "$PR_BRANCH" + # Set the remote URL with PAT for authentication + git remote set-url origin https://${PAT}@github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}.git + git add docs/docs/auto-docs/ git add docs/docs/developer-guide/ git add docs/docs/user-guide/ + if [[ -n "$(git status --porcelain)" ]]; then git commit -m "docs: update auto-generated documentation [skip ci]" - if ! git push origin "HEAD:$PR_BRANCH"; then - echo "Failed to push changes" - exit 1 - fi + # Use PAT in the push command + git push "https://${PAT}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" HEAD:${{ github.head_ref }} else echo "No changes to commit" fi From 21539efdef5abc91160bf5d2b5e46db612d9ffaa Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Tue, 7 Jan 2025 08:28:12 +0530 Subject: [PATCH 25/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 91 +++++++++++++----------------- 1 file changed, 39 insertions(+), 52 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 5b849f566c..da40814ff2 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -500,28 +500,30 @@ jobs: name: Generate Auto Documentation runs-on: ubuntu-latest needs: [Code-Quality-Checks, Test-Application, Start-App-Without-Docker, Docker-Start-Check] + steps: - - uses: actions/checkout@v4 + # Step 1: Checkout the code + - name: Checkout Code + uses: actions/checkout@v4 with: - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.event.pull_request.head.ref }} - fetch-depth: 0 # Required for getting full git history - PAT: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + fetch-depth: 0 + # Step 2: Setup Node.js environment - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '22.x' cache: 'npm' - - name: Install dependencies + # Step 3: Install dependencies + - name: Install Dependencies run: | npm ci npm install -g typedoc typedoc-plugin-markdown + # Step 4: Generate Documentation - name: Generate Documentation run: | - # Generate the documentation typedoc \ --out docs/docs/auto-docs \ --plugin typedoc-plugin-markdown \ @@ -540,62 +542,47 @@ jobs: --exclude "**/node_modules/**" \ --cleanOutputDir true - - name: Create placeholder documentation + # Step 5: Create placeholder documentation (only if not present) + - name: Create Placeholder Documentation run: | - # Create User Guide placeholder - echo "# User Guide - - This section contains the user guide for Talawa Admin. - " > docs/docs/user-guide/intro.md + mkdir -p docs/docs/user-guide + mkdir -p docs/docs/developer-guide/reference - # Create Developer Guide placeholder - echo "# Developer Guide - - This section contains the developer guide for Talawa Admin. - " > docs/docs/developer-guide/intro.md + if [ ! -f docs/docs/user-guide/intro.md ]; then + echo "# User Guide\n\nThis section contains the user guide for Talawa Admin." > docs/docs/user-guide/intro.md + fi - # Create Reference placeholder - echo "# API Reference - - This section contains the auto-generated API documentation for Talawa Admin. - " > docs/docs/developer-guide/reference/README.md + if [ ! -f docs/docs/developer-guide/intro.md ]; then + echo "# Developer Guide\n\nThis section contains the developer guide for Talawa Admin." > docs/docs/developer-guide/intro.md + fi + if [ ! -f docs/docs/developer-guide/reference/README.md ]; then + echo "# API Reference\n\nThis section contains the auto-generated API documentation for Talawa Admin." > docs/docs/developer-guide/reference/README.md + fi + + # Step 6: Set up Git configuration - name: Setup Git Config run: | - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - - - name: Debug GitHub Variables - run: | - echo "GitHub REF: ${{ github.ref }}" - echo "GitHub HEAD REF: ${{ github.head_ref }}" - echo "GitHub BASE REF: ${{ github.base_ref }}" - echo "GitHub REF NAME: ${{ github.ref_name }}" - echo "GitHub EVENT NAME: ${{ github.event_name }}" - echo "Current branch:" - git branch --show-current - echo "All branches:" - git branch -a - echo "Git status:" - git status - - - name: Check and Commit Documentation + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + # Step 7: Check and Commit Changes + - name: Commit Documentation Changes env: - PR_BRANCH: ${{ github.event.pull_request.head.ref }} - PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} - PAT: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # Set the remote URL with PAT for authentication - git remote set-url origin https://${PAT}@github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}.git - + git remote set-url origin https://${GITHUB_TOKEN}@github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}.git + git fetch origin ${{ github.ref_name }} + git checkout ${{ github.ref_name }} + git add docs/docs/auto-docs/ git add docs/docs/developer-guide/ git add docs/docs/user-guide/ - - if [[ -n "$(git status --porcelain)" ]]; then + + if [ -n "$(git status --porcelain)" ]; then git commit -m "docs: update auto-generated documentation [skip ci]" - # Use PAT in the push command - git push "https://${PAT}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" HEAD:${{ github.head_ref }} + git push origin HEAD:${{ github.ref_name }} else - echo "No changes to commit" + echo "No changes to commit." fi + From 0d72d8e01986a4bef8468c3576c317d236ff04ab Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Tue, 7 Jan 2025 08:55:26 +0530 Subject: [PATCH 26/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index da40814ff2..d1208f52e8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -507,6 +507,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.head_ref || github.ref_name }} # Step 2: Setup Node.js environment - name: Setup Node.js From 9ed58899f790e988b455faf6653ceb9040b13dc5 Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Tue, 7 Jan 2025 09:29:38 +0530 Subject: [PATCH 27/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index d1208f52e8..26322ad478 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -506,8 +506,10 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 - ref: ${{ github.head_ref || github.ref_name }} + token: ${{ secrets.GITHUB_TOKEN }} # Step 2: Setup Node.js environment - name: Setup Node.js @@ -572,9 +574,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git remote set-url origin https://${GITHUB_TOKEN}@github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}.git - git fetch origin ${{ github.ref_name }} - git checkout ${{ github.ref_name }} + git remote set-url origin https://${GITHUB_TOKEN}@github.com/${{ github.repository_owner }}/${{ github.event.pull_request.head.repo.full_name }}.git + git fetch origin ${{ github.event.pull_request.head.repo.full_name }} + git checkout ${{ github.event.pull_request.head.repo.full_name }} git add docs/docs/auto-docs/ git add docs/docs/developer-guide/ @@ -582,7 +584,7 @@ jobs: if [ -n "$(git status --porcelain)" ]; then git commit -m "docs: update auto-generated documentation [skip ci]" - git push origin HEAD:${{ github.ref_name }} + git push origin HEAD:${{ github.event.pull_request.head.repo.full_name }} else echo "No changes to commit." fi From c7adccb471809c6b26282258da2ee7a27dbec2ee Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Tue, 7 Jan 2025 09:50:48 +0530 Subject: [PATCH 28/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 26322ad478..b9a994beb4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -574,9 +574,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git remote set-url origin https://${GITHUB_TOKEN}@github.com/${{ github.repository_owner }}/${{ github.event.pull_request.head.repo.full_name }}.git - git fetch origin ${{ github.event.pull_request.head.repo.full_name }} - git checkout ${{ github.event.pull_request.head.repo.full_name }} + git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git + + git fetch origin ${{ github.event.pull_request.head.ref }} + git checkout ${{ github.event.pull_request.head.ref }} git add docs/docs/auto-docs/ git add docs/docs/developer-guide/ @@ -584,7 +585,7 @@ jobs: if [ -n "$(git status --porcelain)" ]; then git commit -m "docs: update auto-generated documentation [skip ci]" - git push origin HEAD:${{ github.event.pull_request.head.repo.full_name }} + git push origin HEAD:${{ github.event.pull_request.head.ref }} else echo "No changes to commit." fi From 19721935ba4454fc40c7ab71da11dcb639bc349f Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Tue, 7 Jan 2025 21:48:22 +0530 Subject: [PATCH 29/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b9a994beb4..dbdcdb2f1a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -16,6 +16,9 @@ on: branches: - '**' +permissions: + contents: write + env: CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }} From d18124234d317dd7be6a3949bd838a8d18483a3f Mon Sep 17 00:00:00 2001 From: Rukh-Khan Date: Tue, 7 Jan 2025 22:11:36 +0530 Subject: [PATCH 30/30] #2970: autoGen-talawa-admin-docs-debugging --- .github/workflows/pull-request.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index dbdcdb2f1a..f1c609e29a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -555,22 +555,22 @@ jobs: mkdir -p docs/docs/developer-guide/reference if [ ! -f docs/docs/user-guide/intro.md ]; then - echo "# User Guide\n\nThis section contains the user guide for Talawa Admin." > docs/docs/user-guide/intro.md + printf "# User Guide\n\nThis section contains the user guide for Talawa Admin.\n" > docs/docs/user-guide/intro.md fi if [ ! -f docs/docs/developer-guide/intro.md ]; then - echo "# Developer Guide\n\nThis section contains the developer guide for Talawa Admin." > docs/docs/developer-guide/intro.md + printf "# Developer Guide\n\nThis section contains the developer guide for Talawa Admin.\n" > docs/docs/developer-guide/intro.md fi if [ ! -f docs/docs/developer-guide/reference/README.md ]; then - echo "# API Reference\n\nThis section contains the auto-generated API documentation for Talawa Admin." > docs/docs/developer-guide/reference/README.md + printf "# API Reference\n\nThis section contains the auto-generated API documentation for Talawa Admin.\n" > docs/docs/developer-guide/reference/README.md fi # Step 6: Set up Git configuration - name: Setup Git Config run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --global user.email "actions@github.com" + git config --global user.name "gh-actions" # Step 7: Check and Commit Changes - name: Commit Documentation Changes