Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}

16 changes: 16 additions & 0 deletions scripts/dev-lead-fix-issue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ check_existing_pr() {
[ "$existing" -gt 0 ]
}

setup_git_identity() {
local bot="${BOT_USER:-donpetry-bot}"
Comment thread
don-petry marked this conversation as resolved.
local bot_id
bot_id=$(gh api "users/${bot}" --jq '.id' 2>/dev/null || echo "")
if [ -n "$bot_id" ]; then
git config user.email "${bot_id}+${bot}@users.noreply.github.com"
else
git config user.email "${bot}@users.noreply.github.com"
fi
git config user.name "$bot"
Comment thread
don-petry marked this conversation as resolved.
}

main() {
if [ -z "$ISSUE_NUMBER" ]; then
echo "::error::ISSUE_NUMBER is required"
Expand Down Expand Up @@ -47,6 +59,10 @@ main() {
exit 0
fi

# Configure git identity so the post-engine commit does not fail.
# BOT_USER is set as a job-level env var in dev-lead-reusable.yml.
setup_git_identity

# Create feature branch
local branch
branch="dev-lead/issue-${ISSUE_NUMBER}-$(date +%Y%m%d-%H%M)"
Expand Down
Loading