Skip to content

Fix daily-log workflow change detection for newly generated files#2

Merged
CyberYui merged 1 commit into
mainfrom
copilot/check-auto-punch-clock-issue
May 18, 2026
Merged

Fix daily-log workflow change detection for newly generated files#2
CyberYui merged 1 commit into
mainfrom
copilot/check-auto-punch-clock-issue

Conversation

Copilot AI commented May 18, 2026

Copy link
Copy Markdown
Contributor

daily-log runs were completing successfully but often ended with No changes even when a new daily markdown file was generated. The workflow’s change check only inspected unstaged diffs, so untracked logs/... files were missed.

  • What changed

    • Commit gate now checks staged changes
      • Stage logs before evaluating whether there is anything to commit.
      • Switch the condition from unstaged diff to cached diff.
    • Commit flow remains unchanged after detection
      • Bot identity, commit message format, and push behavior are unchanged.
  • Why this addresses the issue

    • New files are untracked until staged; by staging first and checking --cached, the workflow correctly detects fresh daily log outputs.
- name: Commit if changed
  run: |
    git add logs
    if git diff --cached --quiet; then
      echo "No changes"
      exit 0
    fi
    git config user.name "github-actions[bot]"
    git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
    git commit -m "chore(log): daily KiriMonoLog $(date -u +'%Y-%m-%d')"
    git push

Copilot AI requested a review from CyberYui May 18, 2026 08:01
@CyberYui

Copy link
Copy Markdown
Owner

fix auto problem

@CyberYui CyberYui marked this pull request as ready for review May 18, 2026 08:10
@CyberYui CyberYui merged commit cd1ab55 into main May 18, 2026
5 checks passed
Copilot stopped work on behalf of CyberYui due to an error May 18, 2026 08:12
Copilot AI deleted the copilot/check-auto-punch-clock-issue branch June 15, 2026 02:32
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.

2 participants