Skip to content

Commit f8b7a9b

Browse files
authored
Merge pull request #12157 from github/repo-sync
repo sync
2 parents 651744e + 46fdeaa commit f8b7a9b

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/staging-build-pr.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- name: Dump full context for debugging
37-
env:
38-
GITHUB_CONTEXT: ${{ toJSON(github) }}
39-
run: echo "$GITHUB_CONTEXT"
37+
run: |
38+
cat << EOF
39+
${{ toJSON(github) }}
40+
EOF
4041
4142
build-pr:
4243
if: ${{ github.repository == 'github/docs-internal' || github.repository == 'github/docs' }}

middleware/render-page.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ export default async function renderPage(req, res, next) {
3434

3535
// Updating the Last-Modified header for substantive changes on a page for engineering
3636
// Docs Engineering Issue #945
37-
if (context.page.effectiveDate !== '') {
37+
if (context.page.effectiveDate) {
38+
// Note that if a page has an invalidate `effectiveDate` string value,
39+
// it would be caught prior to this usage and ultimately lead to
40+
// 500 error.
3841
res.setHeader('Last-Modified', new Date(context.page.effectiveDate).toUTCString())
3942
}
4043

0 commit comments

Comments
 (0)