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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: true
contact_links:
- name: 🗣 Subproject discussions
url: https://github.com/camaraproject/§repo_name§/discussions
url: https://github.com/camaraproject/{{repo_name}}/discussions
about: Please ask and answer questions here.
- name: 📖 CAMARA API Design Guidelines
url: https://github.com/camaraproject/Commonalities/blob/main/documentation/CAMARA-API-Design-Guide.md
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/setup-new-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,41 @@ jobs:
-F message='Update README.md with project metadata' \
-F content="$(base64 -w 0 README.md)" \
-F sha="$SHA"

- name: Update issue template config placeholders
run: |
# Update .github/ISSUE_TEMPLATE/config.yml placeholders
CONFIG_FILE=".github/ISSUE_TEMPLATE/config.yml"
if [ -f "$CONFIG_FILE" ]; then
echo "Updating $CONFIG_FILE placeholders..."
sed -i "s/{{repo_name}}/$REPO_NAME/g" $CONFIG_FILE

# Wait for the config.yml file to be available in the new repository
CONFIG_SHA=""
for i in {1..5}; do
CONFIG_SHA=$(gh api repos/$OWNER/$REPO_NAME/contents/$CONFIG_FILE 2>/dev/null | jq -r '.sha')
if [ "$CONFIG_SHA" != "null" ] && [ -n "$CONFIG_SHA" ]; then
echo "Found $CONFIG_FILE sha: $CONFIG_SHA"
break
else
echo "$CONFIG_FILE not yet available, retrying in 2s..."
sleep 2
fi
done

if [ "$CONFIG_SHA" != "null" ] && [ -n "$CONFIG_SHA" ]; then
gh api repos/$OWNER/$REPO_NAME/contents/$CONFIG_FILE \
-X PUT \
-F message="Update $CONFIG_FILE with project metadata" \
-F content="$(base64 -w 0 $CONFIG_FILE)" \
-F sha="$CONFIG_SHA"
echo "Successfully updated $CONFIG_FILE"
else
echo "::warning::Could not find $CONFIG_FILE in the repository. Skipping update."
fi
else
echo "::warning::$CONFIG_FILE not found in template. Skipping update."
fi

- name: Set team permissions
run: |
Expand Down
Loading