Skip to content

Commit f142d44

Browse files
authored
Update content changes table workflow (#48658)
1 parent 23e4b4e commit f142d44

File tree

2 files changed

+4
-29
lines changed

2 files changed

+4
-29
lines changed

.github/workflows/content-changes-table-comment.yml

+4-28
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ on:
2020
description: 'Head SHA (latest sha of the PR)'
2121
type: string
2222
required: true
23+
push:
24+
paths:
25+
- 'content/**'
2326
# Required in lieu of `pull_request` so that the content changes tables can be posts to PRs opened from a fork.
2427
pull_request_target:
2528

@@ -33,35 +36,8 @@ concurrency:
3336
cancel-in-progress: true
3437

3538
jobs:
36-
PR-Preview-Links:
37-
if: github.event.pull_request.user.login != 'docs-bot' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs')
38-
name: Add staging/live links to PR
39-
runs-on: ubuntu-latest
40-
outputs:
41-
filterContentDir: ${{ steps.filter.outputs.filterContentDir }}
42-
steps:
43-
- name: Check out repo
44-
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
45-
46-
- name: Get files changed
47-
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
48-
id: filter
49-
with:
50-
# Base branch used to get changed files
51-
base: ${{ github.event.pull_request.base.ref }}
52-
53-
# Enables setting an output in the format in `${FILTER_NAME}_files
54-
# with the names of the matching files formatted as JSON array
55-
list-files: json
56-
57-
# Returns list of changed files matching each filter
58-
filters: |
59-
filterContentDir:
60-
- 'content/**/*'
61-
6239
filterContentDir:
63-
needs: PR-Preview-Links
64-
if: ${{ needs.PR-Preview-Links.outputs.filterContentDir == 'true' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs') }}
40+
if: ${{ github.event.pull_request.user.login != 'docs-bot' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs') }}
6541
runs-on: ubuntu-latest
6642
env:
6743
PR_NUMBER: ${{ github.event.pull_request.number || inputs.PR_NUMBER }}

src/workflows/content-changes-table-comment.js

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ async function main(owner, repo, baseSHA, headSHA) {
6363
})
6464

6565
const { files } = response.data
66-
6766
const markdownTableHead = [
6867
'| **Source** | **Preview** | **Production** | **What Changed** |',
6968
'|:----------- |:----------- |:----------- |:----------- |',

0 commit comments

Comments
 (0)