Skip to content

Commit ee0dc4c

Browse files
author
Darius Neațu
committed
Update PR title to include date and review request
1 parent 9bb9c56 commit ee0dc4c

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/sync-docs.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ jobs:
5151
- name: Generate branch name
5252
id: branch-name
5353
run: |
54-
BRANCH_NAME="website-weekly-docs-import-$(date +%Y-%m-%d)"
54+
DATE_STR=$(date +%Y-%m-%d)
55+
BRANCH_NAME="website-weekly-docs-import-$DATE_STR"
5556
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
57+
echo "date_str=$DATE_STR" >> $GITHUB_OUTPUT
5658
echo "Generated branch name: $BRANCH_NAME"
5759
5860
- name: Show changes
@@ -86,12 +88,16 @@ jobs:
8688
echo " Base branch: main"
8789
echo ""
8890
echo "Token Information:"
89-
if [ -n "${{ secrets.GH_PAT }}" ]; then
91+
GH_PAT_VALUE="${{ secrets.GH_PAT }}"
92+
if [ -n "$GH_PAT_VALUE" ] && [ "$GH_PAT_VALUE" != "" ]; then
9093
echo " Token type: GH_PAT (Personal Access Token)"
9194
echo " Token available: ✅ Yes"
95+
echo " Token length: ${#GH_PAT_VALUE} characters"
9296
else
9397
echo " Token type: GITHUB_TOKEN"
9498
echo " Token available: ⚠️ Limited permissions on PRs"
99+
echo " GH_PAT secret: ❌ Not found or empty"
100+
echo " Note: Add GH_PAT secret at: Settings > Secrets and variables > Actions"
95101
fi
96102
echo ""
97103
echo "Permissions:"
@@ -106,14 +112,17 @@ jobs:
106112
- name: Check if PAT is available for PR creation
107113
id: check-pat
108114
run: |
109-
if [ -n "${{ secrets.GH_PAT }}" ]; then
115+
GH_PAT_VALUE="${{ secrets.GH_PAT }}"
116+
if [ -n "$GH_PAT_VALUE" ] && [ "$GH_PAT_VALUE" != "" ]; then
110117
echo "pat_available=true" >> $GITHUB_OUTPUT
111118
echo "✅ GH_PAT secret is available - will use it for PR creation"
119+
echo " Token length: ${#GH_PAT_VALUE} characters"
112120
else
113121
echo "pat_available=false" >> $GITHUB_OUTPUT
114122
if [ "${{ github.event_name }}" == "pull_request" ]; then
115123
echo "❌ FATAL: GH_PAT secret is required when running on pull_request events"
116124
echo " Add GH_PAT secret at: Settings > Secrets and variables > Actions"
125+
echo " Current value: [empty or not set]"
117126
exit 1
118127
else
119128
echo "⚠️ GH_PAT secret not found - using GITHUB_TOKEN"
@@ -128,7 +137,7 @@ jobs:
128137
base: main
129138
commit-message: "Auto-sync documentation from latest content of bemanproject/beman"
130139
branch: ${{ steps.branch-name.outputs.branch_name }}
131-
title: "Weekly docs sync"
140+
title: "Beman website weekly sync import (${{ steps.branch-name.outputs.date_str }}) - please review"
132141
body: |
133142
Automated sync of documentation and images from latest content of bemanproject/beman.
134143
labels: |

0 commit comments

Comments
 (0)