Skip to content

Commit 1239c76

Browse files
authored
fix: use pull requests for feature tracker updates instead of direct push (#246)
- Replace direct push to protected master branch with PR creation - Add proper GITHUB_TOKEN environment for git operations - Use existing repository labels for PR creation - Prevents GH006 protected branch update errors
1 parent 1afb0da commit 1239c76

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

.github/workflows/feature-discovery.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,8 @@ jobs:
596596
597597
- name: Commit feature tracker updates
598598
if: steps.claude-discovery.conclusion == 'success'
599+
env:
600+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
599601
run: |
600602
set -euo pipefail
601603
@@ -641,8 +643,29 @@ jobs:
641643
642644
[skip ci]"
643645
644-
# Push changes
645-
git push origin HEAD
646+
# Create branch and push for PR since master is protected
647+
BRANCH_NAME="feature-discovery/tracker-update-$(date +%Y%m%d-%H%M%S)"
648+
git checkout -b "$BRANCH_NAME"
649+
git push origin "$BRANCH_NAME"
650+
651+
# Create pull request for tracker updates
652+
gh pr create \
653+
--title "chore: update AWS Backup feature discovery tracker" \
654+
--body "Automated update of feature discovery tracker database.
655+
656+
**Scan Details:**
657+
- Scan completed: $(date -u '+%Y-%m-%d %H:%M:%S UTC')
658+
- Provider version: ${{ inputs.provider_version || 'latest' }}
659+
- Workflow run: ${{ github.run_id }}
660+
661+
This PR contains automated updates to the feature tracking database and can be safely merged.
662+
663+
---
664+
*Auto-generated by AWS Backup Feature Discovery workflow*" \
665+
--label "aws-backup,ci-cd,configuration" \
666+
--assignee "lgallard"
667+
668+
echo "Created PR for tracker updates on branch: $BRANCH_NAME"
646669
647670
# Release lock
648671
flock -u 200

0 commit comments

Comments
 (0)