Skip to content

Commit c4c7825

Browse files
authored
Merge pull request #140 from itsdarshan12/development
Development
2 parents 8565b34 + 38fb90d commit c4c7825

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @treadstone26
1+
* @itsdarshan12

.github/workflows/enforce-codeowners.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,15 @@ jobs:
4242
run: |
4343
echo "📌 Target branch: $TARGET_BRANCH"
4444
echo "📌 Head branch: $HEAD_BRANCH"
45-
TEMPLATE=".github/CODEOWNERS.$TARGET_BRANCH"
4645
46+
47+
# Normalize hotfix to use main's template
48+
if [[ "$TARGET_BRANCH" == "hotfix" ]]; then
49+
TEMPLATE=".github/CODEOWNERS.main"
50+
else
51+
TEMPLATE=".github/CODEOWNERS.$TARGET_BRANCH"
52+
fi
53+
4754
if [ -f "$TEMPLATE" ]; then
4855
cp "$TEMPLATE" .github/CODEOWNERS
4956
echo "✅ CODEOWNERS restored from $TEMPLATE"
@@ -52,6 +59,7 @@ jobs:
5259
exit 1
5360
fi
5461

62+
5563
- name: Commit and push updated CODEOWNERS
5664
run: |
5765
git config user.name "github-actions[bot]"

0 commit comments

Comments
 (0)