Skip to content

Updated the repo for sync#1

Open
wickedyoda wants to merge 4 commits intotechrelay:mainfrom
GLiNet-Community-Scripts:main
Open

Updated the repo for sync#1
wickedyoda wants to merge 4 commits intotechrelay:mainfrom
GLiNet-Community-Scripts:main

Conversation

@wickedyoda
Copy link
Copy Markdown

  1. Updated the repo for daily sync from main repo to glinet community repo.

Copilot AI review requested due to automatic review settings April 20, 2026 17:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a daily GitHub Actions workflow to keep this fork in sync with its upstream repo and updates the README’s supported device list / prerequisites.

Changes:

  • Added a scheduled + manual GitHub Actions workflow to sync the fork’s default branch with upstream, with optional workflow “protection” and force-sync.
  • Updated README prerequisite note (HTTPS + MagicDNS) and added Spitz AX (GL-X3000) to the tested routers list.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
README.md Updates prerequisites and expands the tested devices list.
.github/workflows/sync-fork.yml Introduces automated fork↔upstream sync with optional workflow restore and a run summary.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +118 to +121
git log "$PRE_SHA"..HEAD --pretty=format:"%h|%s" | while IFS='|' read -r sha msg; do
REPO="${{ steps.upstream.outputs.repo }}"
echo "| [\`$sha\`](https://github.com/$REPO/commit/$sha) | $msg |" >> "$GITHUB_STEP_SUMMARY"
done
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The summary table generation uses | as a delimiter (--pretty=format:"%h|%s" and IFS='|'). Since commit subjects can legally contain |, this can corrupt parsing and the Markdown table. Consider using a delimiter that can’t appear in %s (e.g., NUL via %x00 and read -d '') or avoid parsing by splitting only the first token and treating the rest as the message.

Suggested change
git log "$PRE_SHA"..HEAD --pretty=format:"%h|%s" | while IFS='|' read -r sha msg; do
REPO="${{ steps.upstream.outputs.repo }}"
echo "| [\`$sha\`](https://github.com/$REPO/commit/$sha) | $msg |" >> "$GITHUB_STEP_SUMMARY"
done
while IFS= read -r -d '' sha && IFS= read -r -d '' msg; do
REPO="${{ steps.upstream.outputs.repo }}"
escaped_msg="${msg//|/\\|}"
echo "| [\`$sha\`](https://github.com/$REPO/commit/$sha) | $escaped_msg |" >> "$GITHUB_STEP_SUMMARY"
done < <(git log "$PRE_SHA"..HEAD --pretty=format:'%h%x00%s%x00')

Copilot uses AI. Check for mistakes.
echo "| SHA | Message |" >> "$GITHUB_STEP_SUMMARY"
echo "|---|---|" >> "$GITHUB_STEP_SUMMARY"
git log "$PRE_SHA"..HEAD --pretty=format:"%h|%s" | while IFS='|' read -r sha msg; do
REPO="${{ steps.upstream.outputs.repo }}"
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the job summary, commit links are built using the upstream repo (REPO="${{ steps.upstream.outputs.repo }}"), but the range PRE_SHA..HEAD can include fork-only commits (e.g., a merge commit and/or the "restore local .github/workflows" commit). Those SHAs won’t exist in the upstream repo, causing 404 links. Point links at the fork repository (e.g., ${{ github.repository }}) or dynamically select upstream vs fork per commit.

Suggested change
REPO="${{ steps.upstream.outputs.repo }}"
REPO="${{ github.repository }}"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants