Skip to content

Commit

Permalink
Merge pull request github#31060 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Jan 11, 2024
2 parents 81ccb8d + f142d44 commit 841882d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 30 deletions.
32 changes: 4 additions & 28 deletions .github/workflows/content-changes-table-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:
description: 'Head SHA (latest sha of the PR)'
type: string
required: true
push:
paths:
- 'content/**'
# Required in lieu of `pull_request` so that the content changes tables can be posts to PRs opened from a fork.
pull_request_target:

Expand All @@ -33,35 +36,8 @@ concurrency:
cancel-in-progress: true

jobs:
PR-Preview-Links:
if: github.event.pull_request.user.login != 'docs-bot' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs')
name: Add staging/live links to PR
runs-on: ubuntu-latest
outputs:
filterContentDir: ${{ steps.filter.outputs.filterContentDir }}
steps:
- name: Check out repo
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- name: Get files changed
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
id: filter
with:
# Base branch used to get changed files
base: ${{ github.event.pull_request.base.ref }}

# Enables setting an output in the format in `${FILTER_NAME}_files
# with the names of the matching files formatted as JSON array
list-files: json

# Returns list of changed files matching each filter
filters: |
filterContentDir:
- 'content/**/*'
filterContentDir:
needs: PR-Preview-Links
if: ${{ needs.PR-Preview-Links.outputs.filterContentDir == 'true' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs') }}
if: ${{ github.event.pull_request.user.login != 'docs-bot' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs') }}
runs-on: ubuntu-latest
env:
PR_NUMBER: ${{ github.event.pull_request.number || inputs.PR_NUMBER }}
Expand Down
2 changes: 1 addition & 1 deletion src/rest/components/get-rest-code-samples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function getShellExample(operation: Operation, codeSample: CodeSample) {
if (bodyParameters && typeof bodyParameters === 'object' && !Array.isArray(bodyParameters)) {
const paramNames = Object.keys(bodyParameters)
paramNames.forEach((elem) => {
requestBodyParams = `${requestBodyParams} ${CURL_CONTENT_TYPE_MAPPING[contentType]} "${elem}=${bodyParameters[elem]}"`
requestBodyParams = `${requestBodyParams} ${CURL_CONTENT_TYPE_MAPPING[contentType]} '${elem}=${bodyParameters[elem]}'`
})
} else {
requestBodyParams = `${CURL_CONTENT_TYPE_MAPPING[contentType]} "${bodyParameters}"`
Expand Down
1 change: 0 additions & 1 deletion src/workflows/content-changes-table-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ async function main(owner, repo, baseSHA, headSHA) {
})

const { files } = response.data

const markdownTableHead = [
'| **Source** | **Preview** | **Production** | **What Changed** |',
'|:----------- |:----------- |:----------- |:----------- |',
Expand Down

0 comments on commit 841882d

Please sign in to comment.