Skip to content

Add FAQ last_modified workflow#989

Open
lyzhang0113 wants to merge 1 commit intopreviewfrom
wf-test/lastmod
Open

Add FAQ last_modified workflow#989
lyzhang0113 wants to merge 1 commit intopreviewfrom
wf-test/lastmod

Conversation

@lyzhang0113
Copy link
Copy Markdown
Collaborator

@lyzhang0113 lyzhang0113 commented Mar 25, 2026

Summary

  • Add a GitHub Actions workflow that updates last_modified for FAQ markdown files changed in PRs targeting master.
  • Keep the workflow scoped to same-repo PRs so it can safely push timestamp commits back to the PR branch.
  • Add concurrency, explicit permissions, UTC timestamp formatting, and a rebase before pushing to reduce workflow noise and push failures.

Test Plan

  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/update-last-modified.yml"); puts "YAML OK"'
  • xxd -l 8 .github/workflows/update-last-modified.yml

@lyzhang0113 lyzhang0113 changed the base branch from master to preview April 28, 2026 21:09
@lyzhang0113 lyzhang0113 changed the title Wf test/lastmod Add FAQ last_modified workflow Apr 28, 2026
@lyzhang0113 lyzhang0113 marked this pull request as ready for review April 28, 2026 21:10
@lyzhang0113 lyzhang0113 requested review from Copilot and tony-xlh April 28, 2026 21:16
Copy link
Copy Markdown
Contributor

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 an automated GitHub Actions workflow to keep last_modified front matter up to date for FAQ markdown files when they’re changed in pull requests targeting master, with safeguards to only run on same-repo PRs so it can push a timestamp commit back to the PR branch.

Changes:

  • Introduces a new pull_request-triggered workflow scoped to _articles/faq/*.md changes.
  • Detects changed FAQ files vs the PR base branch, updates/creates last_modified in YAML front matter, and commits + pushes back to the PR branch.
  • Adds concurrency control and explicit token permissions to reduce races and push failures.

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

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