Skip to content

Commit 35d64eb

Browse files
docs: review .github/workflows/auto_review_documentation.yml (#61)
1 parent 6a5896e commit 35d64eb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/auto_review_documentation.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Checkout code
2626
uses: actions/checkout@v4
2727
with:
28-
fetch-depth: 0 # Critical for comparing two SHAs
28+
fetch-depth: 0 # Required to compare two SHAs in full history
2929

3030
- name: Set up Python
3131
uses: actions/setup-python@v4
@@ -40,14 +40,15 @@ jobs:
4040
- name: Get changed files
4141
id: changed-docs
4242
run: |
43-
git diff --name-only ${{ github.event.before }} ${{ github.sha }} > changed_docs.txt # changed_files.txt
44-
# TODO: enable for documentation file only
43+
# Retrieve list of files changed between the previous commit and the current SHA
44+
git diff --name-only ${{ github.event.before }} ${{ github.sha }} > changed_docs.txt
45+
# TODO: filter to include only documentation files (e.g., .md, .rst, README, .ipynb)
4546
# grep -E '\.md$|\.rst$|README|\.ipynb$' changed_files.txt || true > changed_docs.txt
4647
cat changed_docs.txt
4748
4849
- name: Azure Login
4950
uses: azure/login@v2
50-
with:
51+
with:
5152
client-id: ${{ secrets.AZURE_CLIENT_ID }}
5253
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
5354
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
@@ -56,7 +57,7 @@ jobs:
5657
run: |
5758
while read file; do
5859
if [ -n "$file" ]; then
59-
echo "Running script with INPUT_FILE_PATH=$file"
60+
echo "Running review script on file: $file"
6061
INPUT_FILE_PATH="$file" python tools/review_file/review_file.py
6162
fi
62-
done < changed_docs.txt
63+
done < changed_docs.txt

0 commit comments

Comments
 (0)