Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo sync #1791

Merged
merged 130 commits into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
d818c9f
restore old hidden docs implementation
sarahs Oct 20, 2020
02308fd
add early-access-test to products.yml
sarahs Oct 20, 2020
247fa66
hide contribution button on hidden docs
sarahs Oct 20, 2020
a45c854
activeProducts are neither wip nor hidden
sarahs Oct 20, 2020
f40f241
support hidden products, which will just be early-access in practice
sarahs Oct 20, 2020
beaf733
hide early-access from public list of products
sarahs Oct 21, 2020
e44bef8
Merge branch 'main' of https://github.com/github/docs-internal into h…
sarahs Oct 21, 2020
3170d8c
try heroku prebuild script
sarahs Oct 21, 2020
f355a2e
use GITHUB_TOKEN for clone
sarahs Oct 21, 2020
71bfc0d
go back to old access key for testing
sarahs Oct 21, 2020
1a0c41b
testing testing
sarahs Oct 21, 2020
0304ff3
testing testing
sarahs Oct 21, 2020
07d090e
use early-access-test
sarahs Oct 21, 2020
d290d40
update middleware and tests around robots.txt exclusions of hidden/EA…
sarahs Oct 22, 2020
f4e05b1
exclude hidden products in addition to hidden pages from Algolia
sarahs Oct 22, 2020
4341a92
Merge branch 'main' of https://github.com/github/docs-internal into h…
sarahs Oct 22, 2020
129641c
add separate clone script to be run as heroku-prebuild script or loca…
sarahs Oct 22, 2020
d7be84f
Merge branch 'main' of https://github.com/github/docs-internal into h…
sarahs Oct 23, 2020
896db3d
comment out branch check for now
sarahs Oct 23, 2020
822649f
add yml config file for setting the EA branch
sarahs Oct 23, 2020
16f9fc7
use the new yml config file for setting the EA branch
sarahs Oct 23, 2020
ea9b161
change GITHUB_DOCUBOT_REPO_PAT to DOCUBOT_REPO_PAT
sarahs Oct 23, 2020
a36c112
test for presence of content/early-access dir
sarahs Oct 23, 2020
e94e4b7
clone early-access repo during testing
sarahs Oct 23, 2020
b020382
empty commit
sarahs Oct 23, 2020
cad55f5
set staging branch back to main
sarahs Oct 26, 2020
1e9a319
conditional test of early access in actions only
sarahs Oct 26, 2020
24a281a
run clone script from docs-internal only
sarahs Oct 26, 2020
df545e8
update var refs in script
sarahs Oct 26, 2020
dc50c74
Merge branch 'main' of https://github.com/github/docs-internal into h…
sarahs Oct 26, 2020
472a9d2
Merge branch 'main' of https://github.com/github/docs-internal into h…
sarahs Oct 26, 2020
fc33985
Merge branch 'main' into hidden-docs-alt
sarahs Oct 26, 2020
63e3f91
Merge branch 'main' of https://github.com/github/docs-internal into h…
sarahs Nov 2, 2020
271923e
Merge branch 'hidden-docs-alt' of https://github.com/github/docs-inte…
sarahs Nov 2, 2020
67466e8
duplicate change between lint and test steps
sarahs Nov 2, 2020
521d11b
Merge branch 'main' into hidden-docs-alt
JamesMGreene Nov 3, 2020
04e9656
Use Heroku postbuild so the dependencies are installed before cloning…
JamesMGreene Nov 3, 2020
9720574
Add a username to the Git repo string for more completeness
JamesMGreene Nov 3, 2020
850c11a
Fix workflow syntax error
JamesMGreene Nov 3, 2020
c6980ab
Fix the other workflow syntax error I missed
JamesMGreene Nov 3, 2020
3008ad1
Update all heroku-prebuild refs to heroku-postbuild
JamesMGreene Nov 3, 2020
3e09715
Add debugging log to cloning script
JamesMGreene Nov 3, 2020
1ea1396
Split debugging statement
JamesMGreene Nov 3, 2020
7514a54
Remove EA cloning from lint -- no JS files in there to lint
JamesMGreene Nov 3, 2020
d00f437
Remove debugging statements
JamesMGreene Nov 3, 2020
105bf42
Try removing the x-access-token username from the Git URL
JamesMGreene Nov 3, 2020
da7afd4
Manually override GitHub Actions extraHeader
JamesMGreene Nov 3, 2020
e913c26
Try ONLY clearing out the extraHeader value rather than overwriting it
JamesMGreene Nov 3, 2020
8b8d6d2
Merge branch 'main' into hidden-docs-alt
heiskr Nov 3, 2020
0cf94f2
Merge branch 'main' of https://github.com/github/docs-internal into h…
sarahs Nov 3, 2020
c4b5018
update docs path in newly added robots test
sarahs Nov 3, 2020
089e99b
Merge branch 'main' into hidden-docs-alt
sarahs Nov 4, 2020
2be96ed
Try using actions/checkout's persist-credentials input instead of man…
JamesMGreene Nov 4, 2020
4868f97
Explicitly add 'npm run build' to the 'heroku-postbuild' script as th…
JamesMGreene Nov 4, 2020
ed3baeb
Update to use new github/docs-early-access repo
JamesMGreene Nov 5, 2020
f410fd1
Mostly reverting github/docs-internal#15313
JamesMGreene Nov 9, 2020
e1f3f64
Merge branch 'main' into hidden-docs-alt
JamesMGreene Nov 9, 2020
81fda0e
Cloning script refinements and future planning
JamesMGreene Nov 9, 2020
2c030a8
Remove early-access from the sorted product ID list???
JamesMGreene Nov 10, 2020
4fac3de
Comment out premature tests
JamesMGreene Nov 10, 2020
3e0d94e
Fix pathing on CrowdIn config tests
JamesMGreene Nov 10, 2020
bdb859f
Be consistent about paths in CrowdIn config
JamesMGreene Nov 10, 2020
bc3131b
Remove old '/early-access' redirect from API Previews page
JamesMGreene Nov 10, 2020
10b9000
Add early-access back in as a product
JamesMGreene Nov 10, 2020
6940bc3
Sort hidden page listing by relativePath
JamesMGreene Nov 10, 2020
b75cb10
Make Early Access tests only run on the docs-internal repo
JamesMGreene Nov 10, 2020
dac5bc7
Don't re-run build for Actions in the internal repo
JamesMGreene Nov 10, 2020
5b6d704
Rename clone-early-access script
JamesMGreene Nov 10, 2020
050ff6d
Update for early-access under assets/images/
JamesMGreene Nov 10, 2020
1b3af6e
Add Early Access context via middleware to show list of pages
JamesMGreene Nov 11, 2020
287ee20
EA context middleware cleanup
JamesMGreene Nov 11, 2020
fc91756
Add script to symlink to local early-access repo
JamesMGreene Nov 11, 2020
af3a7f3
Remove unused require in script
JamesMGreene Nov 13, 2020
272c472
Add new content-linting tests for Early Access
JamesMGreene Nov 13, 2020
dc36bd8
Change one old API Previews link to use a different redirect URL with…
JamesMGreene Nov 13, 2020
53910e2
Changes to handle a symlink Early Access environment
JamesMGreene Nov 13, 2020
1a732ea
Let's 404 the /early-access page outside of local rather than 403-ing
JamesMGreene Nov 13, 2020
510a0e3
Add test to verify Early Access does not show up as a product in the …
JamesMGreene Nov 13, 2020
dd02bfa
Merge main
heiskr Nov 16, 2020
bfb4a0d
Update package-lock.json
heiskr Nov 16, 2020
367685b
Update symlinking script to support unlinking
JamesMGreene Nov 17, 2020
5c6f5bb
Fix site-data-references tests by using uniqWith instead of uniqBy
JamesMGreene Nov 17, 2020
a53255c
Add tests for site-data-references within article metadata
JamesMGreene Nov 17, 2020
88a889a
Ensure early-access site-data-references are detected by the tests
JamesMGreene Nov 17, 2020
04dff85
Include other actions-only EA-cloning tests now
JamesMGreene Nov 17, 2020
890e86c
Merge branch 'main' into hidden-docs-alt
heiskr Nov 17, 2020
909db6f
Update EA cloning script to rely on the current git branch
JamesMGreene Nov 17, 2020
4962f91
Fix test workflow file
JamesMGreene Nov 17, 2020
1280f6f
Fix rendering tests for /early-access
JamesMGreene Nov 17, 2020
b04f01d
Ignore early-access as a product for the category-pages tests?
JamesMGreene Nov 17, 2020
72d1265
Fix lint-files tests for Early Access to use newly established pattern
JamesMGreene Nov 17, 2020
d402a60
Merge branch 'main' into hidden-docs-alt
JamesMGreene Nov 17, 2020
d6fcc36
Render the nice 404 page for /early-access in non-local envs
JamesMGreene Nov 18, 2020
b244d44
Merge branch 'main' of github.com:github/docs-internal into hidden-do…
sarahs Dec 1, 2020
6304c86
lint
sarahs Dec 1, 2020
93a9d3b
add new script
sarahs Dec 1, 2020
6214ee0
be careful of paths for cross-platform use
sarahs Dec 1, 2020
e49914f
render early access links for the current version on the landing page
sarahs Dec 1, 2020
5248fac
chmod a+x script/early-access/symlink-from-local-repo.js
sarahs Dec 1, 2020
7757617
move early-access link middleware to contextualizers
sarahs Dec 1, 2020
6d82e46
lint
sarahs Dec 2, 2020
d3d2f08
new script to update data and image paths
sarahs Dec 2, 2020
7628caa
Merge branch 'main' of github.com:github/docs-internal into hidden-do…
sarahs Dec 2, 2020
5b49fdf
do not link to early access landing page in sidebar and breadcrumbs
sarahs Dec 2, 2020
2ad6101
show link titles and sort alphabetically
sarahs Dec 2, 2020
98e567a
add message when there are no links for a version
sarahs Dec 2, 2020
3f64bb1
Merge branch 'main' of github.com:github/docs-internal into hidden-do…
sarahs Dec 2, 2020
1258092
Merge branch 'main' of github.com:github/docs-internal into hidden-do…
sarahs Dec 2, 2020
7b9ae59
update script readmes
sarahs Dec 2, 2020
f5fc721
do not show header notifications on 404 page
sarahs Dec 2, 2020
1b051af
Merge branch 'main' of github.com:github/docs-internal into hidden-do…
sarahs Dec 2, 2020
c206ec5
redeploy to staging
sarahs Dec 2, 2020
a8e0ec4
add option to run script on provided path
sarahs Dec 2, 2020
fb791ff
repo sync
Octomerger Dec 3, 2020
2f10991
Merge branch 'main' of github.com:github/docs-internal into hidden-do…
sarahs Dec 3, 2020
75fd006
Close unwanted pull requests (#16679)
heiskr Dec 3, 2020
11d8e41
Check repository references (#16680)
heiskr Dec 3, 2020
82644ef
Merge branch 'main' of github.com:github/docs-internal into hidden-do…
sarahs Dec 3, 2020
52301f3
add clarifying comments about how we derive data filepaths from data …
sarahs Dec 3, 2020
bf61f53
lint
sarahs Dec 3, 2020
ae9956c
add slashes to data paths for consistency with other paths
sarahs Dec 3, 2020
b46e881
properly concat versioned hidden product hrefs
sarahs Dec 3, 2020
ca39999
update hidden page expectations
sarahs Dec 3, 2020
0ae3d35
Merge pull request #16143 from github/hidden-docs-alt
sarahs Dec 3, 2020
c583392
add comment
sarahs Dec 3, 2020
44ccfc2
Merge pull request #16745 from github/hidden-docs-alt-followup
sarahs Dec 3, 2020
30cdb31
Allow repo sync in public repo (#16746)
heiskr Dec 3, 2020
c7870f4
Skip EA articles test temporarily (#16748)
JamesMGreene Dec 3, 2020
218d08f
Branch was updated using the 'autoupdate branch' Actions workflow.
Octomerger Dec 3, 2020
25eeefb
repo sync
Octomerger Dec 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
ALGOLIA_API_KEY=
ALGOLIA_APPLICATION_ID=
ALLOW_TRANSLATION_COMMITS=
EARLY_ACCESS_HOSTNAME=
EARLY_ACCESS_SHARED_SECRET=
GITHUB_TOKEN=
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/improve-existing-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ labels:
assignees: ''
---
<!--
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT https://github.com/github/docs-content/issues/new/choose INSTEAD.
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT INSTEAD.
-->

<!--
For questions, ask in Discussions: https://github.com/github/docs/discussions

Before you file an issue read the:
Before you file an issue read the:
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md
- Contributing guide: https://github.com/github/docs/blob/main/CONTRIBUTING.md

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/improve-the-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ assignees: ''
---

<!--
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT https://github.com/github/docs-content/issues/new/choose INSTEAD.
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT INSTEAD.
-->

<!--
For questions, ask in Discussions: https://github.com/github/docs/discussions

Before you file an issue read the:
Before you file an issue read the:
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md
- Contributing guide: https://github.com/github/docs/blob/main/CONTRIBUTING.md

Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/close-unwanted-pull-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Close unwanted pull requests
on:
pull_request:
paths:
- '.github/workflows/**'
- '.github/CODEOWNERS'
- 'translations/**'
- 'assets/fonts/**'
- 'data/graphql/**'
- 'lib/graphql/**'
- 'lib/redirects/**'
- 'lib/webhooks/**'
jobs:
close_unwanted_pull_requests:
if: github.repository == 'github/docs' && github.event.pull_request.user.login != 'Octomerger'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
with:
script: |
await github.issues.createComment({
...context.repo,
issue_number: context.payload.pull_request.number,
body:
`Thanks for contributing! We do not accept community changes to these files at this time.
- '.github/workflows/**'
- '.github/CODEOWNERS'
- 'translations/**'
- 'assets/fonts/**'
- 'data/graphql/**'
- 'lib/graphql/**'
- 'lib/redirects/**'
- 'lib/webhooks/**'`
})
await github.issues.update({
...context.repo,
issue_number: context.payload.pull_request.number,
state: 'closed'
})
2 changes: 1 addition & 1 deletion .github/workflows/sync-algolia-search-indices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
if: failure()
env:
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
SLACK_MESSAGE: The last Algolia workflow run for ${{github.repository}} failed. See https://github.com/github/docs-internal/actions?query=workflow%3AAlgolia
SLACK_MESSAGE: The last Algolia workflow run for ${{github.repository}} failed. Search actions for `workflow:Algolia`
23 changes: 13 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
cancel_others: 'false'
github_token: ${{ github.token }}
paths: '[".github/workflows/test.yml",".node-version", ".npmrc", "app.json", "content/**", "data/**","lib/**", "Dockerfile", "feature-flags.json", "Gemfile", "Gemfile.lock", "middleware/**", "node_modules/**","package.json", "package-lock.json", "server.js", "tests/**", "translations/**", "Procfile", "webpack.config.js"]'
paths: '[".github/workflows/test.yml", ".node-version", ".npmrc", "app.json", "content/**", "data/**","lib/**", "Dockerfile", "feature-flags.json", "Gemfile", "Gemfile.lock", "middleware/**", "node_modules/**","package.json", "package-lock.json", "server.js", "tests/**", "translations/**", "Procfile", "webpack.config.js"]'

test:
needs: see_if_should_skip
Expand All @@ -44,6 +44,9 @@ jobs:
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with:
# Enables cloning the Early Access repo later with the relevant PAT
persist-credentials: 'false'

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Setup node
Expand All @@ -70,19 +73,19 @@ jobs:
name: Install dependencies
run: npm ci

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Run build script
- name: Clone early access
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository == 'github/docs-internal' }}
run: npm run heroku-postbuild
env:
DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
GIT_BRANCH: ${{ github.ref }}

- name: Run build script
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository != 'github/docs-internal' }}
run: npm run build

- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
name: Run tests
run: npx jest tests/${{ matrix.test-group }}/
env:
NODE_OPTIONS: '--max_old_space_size=4096'

- name: Send Slack notification if workflow fails
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
if: failure() && github.ref == 'early-access'
env:
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
SLACK_MESSAGE: 'Tests are failing on the `early-access` branch. https://github.com/github/docs-internal/tree/early-access'
14 changes: 11 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
.algolia-cache
.DS_Store
.env
node_modules
/node_modules/
npm-debug.log
coverage
coverage/
.linkinator
broken_links.md
/assets/images/early-access
/content/early-access
/data/early-access
dist

# blc: broken link checker
blc_output.log
blc_output_internal.log
/dist/
broken_links.md
16 changes: 0 additions & 16 deletions assets/images/octicons/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +0,0 @@
## Importing Aftermarket Octicons

#### Background
Some octicons are missing from the project's current version of the `octicons` gem. Because this project is being replaced soon and updating `octicons` would require [significant changes](https://github.com/github/docs-internal/issues/6250#issuecomment-339730405), new octicons should be added manually as needed, via the following process:

#### How to add

1. Locate the missing octicon `.svg` in [primer/octions](https://github.com/primer/octicons/tree/master/lib/svg) and download it to your local `app/assets/images/octions` folder
1. Add a line to `app/assets/stylesheets/shared/_octicons.scss` for the new octicon, like so:
```apple css
.octicon-<YOUR OCTICON NAME>:before {
content: url("#{$new-octicons-path}/<YOUR OCTICON FILENAME>.svg")
}
```

You may now use the new octicon in your content as normal! :tada:
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ typing `git remote -v`:
```shell
$ git remote -v
# View existing remotes
> origin https://github.com/github/reactivecocoa.git (fetch)
> origin https://github.com/github/reactivecocoa.git (push)
> origin https://github.com/ghost/reactivecocoa.git (fetch)
> origin https://github.com/ghost/reactivecocoa.git (push)

$ git remote set-url origin https://github.com/github/ReactiveCocoa.git
$ git remote set-url origin https://github.com/ghost/ReactiveCocoa.git
# Change the 'origin' remote's URL

$ git remote -v
# Verify new remote URL
> origin https://github.com/github/ReactiveCocoa.git (fetch)
> origin https://github.com/github/ReactiveCocoa.git (push)
> origin https://github.com/ghost/ReactiveCocoa.git (fetch)
> origin https://github.com/ghost/ReactiveCocoa.git (push)
```

Alternatively, you can change the URL through our
Expand All @@ -73,7 +73,7 @@ When prompted for a username and password, make sure you use an account that has

{% tip %}

**Tip**: If you don't want to enter your credentials every time you interact with the remote repository, you can turn on [credential caching](/github/using-git/caching-your-github-credentials-in-git). If you are already using credential caching, please make sure that your computer has the correct credentials cached. Incorrect or out of date credentials will cause authentication to fail.
**Tip**: If you don't want to enter your credentials every time you interact with the remote repository, you can turn on [credential caching](/github/using-git/caching-your-github-credentials-in-git). If you are already using credential caching, please make sure that your computer has the correct credentials cached. Incorrect or out of date credentials will cause authentication to fail.

{% endtip %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ Scanning code when someone pushes a change, and whenever a pull request is creat

#### Scanning on push

By default, the {% data variables.product.prodname_codeql_workflow %} uses the `on.push` event to trigger a code scan on every push to the default branch of the repository and any protected branches. For {% data variables.product.prodname_code_scanning %} to be triggered on a specified branch, the workflow must exist in that branch. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#on)."
By default, the {% data variables.product.prodname_codeql_workflow %} uses the `on.push` event to trigger a code scan on every push to the default branch of the repository and any protected branches. For {% data variables.product.prodname_code_scanning %} to be triggered on a specified branch, the workflow must exist in that branch. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#on)."

#### Scanning pull requests

The default {% data variables.product.prodname_codeql_workflow %} uses the `pull_request` event to trigger a code scan on pull requests targeted against the default branch. {% if currentVersion ver_gt "enterprise-server@2.21" %}The `pull_request` event is not triggered if the pull request was opened from a private fork.{% else %}If a pull request is from a private fork, the `pull_request` event will only be triggered if you've selected the "Run workflows from fork pull requests" option in the repository settings. For more information, see "[Disabling or limiting {% data variables.product.prodname_actions %} for a repository](/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks)."{% endif %}
The default {% data variables.product.prodname_codeql_workflow %} uses the `pull_request` event to trigger a code scan on pull requests targeted against the default branch. {% if currentVersion ver_gt "enterprise-server@2.21" %}The `pull_request` event is not triggered if the pull request was opened from a private fork.{% else %}If a pull request is from a private fork, the `pull_request` event will only be triggered if you've selected the "Run workflows from fork pull requests" option in the repository settings. For more information, see "[Disabling or limiting {% data variables.product.prodname_actions %} for a repository](/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks)."{% endif %}

For more information about the `pull_request` event, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags)."

Expand Down Expand Up @@ -148,14 +148,14 @@ jobs:
matrix:
language: ['javascript', 'python']
```

If your workflow does not contain a matrix called `language`, then {% data variables.product.prodname_codeql %} is configured to run analysis sequentially. If you don't specify languages in the workflow, {% data variables.product.prodname_codeql %} automatically detects, and attempts to analyze, any supported languages in the repository. If you want to choose which languages to analyze, without using a matrix, you can use the `languages` parameter under the `init` action.

```yaml
- uses: github/codeql-action/init@v1
with:
languages: cpp, csharp, python
```
```
{% if currentVersion == "free-pro-team@latest" %}
### Analyzing Python dependencies

Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ];
if [ -f requirements.txt ];
then pip install -r requirements.txt;
fi
# Set the `CODEQL-PYTHON` environment variable to the Python executable
Expand All @@ -193,10 +193,10 @@ jobs:
uses: github/codeql-action/init@v1
with:
languages: python
# Override the default behavior so that the action doesn't attempt
# Override the default behavior so that the action doesn't attempt
# to auto-install Python dependencies
setup-python-dependencies: false
```
```
{% endif %}

### Running additional queries
Expand Down Expand Up @@ -239,7 +239,7 @@ In the workflow file, use the `config-file` parameter of the `init` action to sp
```

The configuration file can be located within the local repository, or in a public, remote repository. For remote repositories, you can use the _owner/repository/file.yml@branch_ syntax. The settings in the file are written in YAML format.

#### Specifying additional queries

You specify additional queries in a `queries` array. Each element of the array contains a `uses` parameter with a value that identifies a single query file, a directory containing query files, or a query suite definition file.
Expand All @@ -265,15 +265,15 @@ For the interpreted languages that {% data variables.product.prodname_codeql %}

``` yaml
paths:
- src
paths-ignore:
- src
paths-ignore:
- src/node_modules
- '**/*.test.js'
```

{% note %}

**Note**:
**Note**:

* The `paths` and `paths-ignore` keywords, used in the context of the {% data variables.product.prodname_code_scanning %} configuration file, should not be confused with the same keywords when used for `on.<push|pull_request>.paths` in a workflow. When they are used to modify `on.<push|pull_request>` in a workflow, they determine whether the actions will be run when someone modifies code in the specified directories. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths)."
* `**` characters can only be at the start or end of a line, or surrounded by slashes, and you can't mix `**` and other characters. For example, `foo/**`, `**/foo`, and `foo/**/bar` are all allowed syntax, but `**foo` isn't. However you can use single stars along with other characters, as shown in the example. You'll need to quote anything that contains a `*` character.
Expand All @@ -298,7 +298,7 @@ You can quickly analyze small portions of a monorepo when you modify code in spe

If your workflow for {% data variables.product.prodname_code_scanning %} accesses a private repository, other than the repository that contains the workflow, you'll need to configure Git to authenticate with a personal access token. Define the secret in the runner environment by using `jobs.<job_id>.steps.env` in your workflow before any {% data variables.product.prodname_codeql %} actions. For more information, see "[Creating a personal access token for the command line](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)" and "[Creating and storing encrypted secrets](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)."

For example, the following configuration has Git replace the full URLs to the `github/foo`, `github/bar`, and `github/baz` repositories on {% data variables.product.prodname_dotcom_the_website %} with URLs that include the personal access token that you store in the `ACCESS_TOKEN` environment variable.
For example, the following configuration has Git replace the full URLs to the `ghost/foo`, `ghost/bar`, and `ghost/baz` repositories on {% data variables.product.prodname_dotcom_the_website %} with URLs that include the personal access token that you store in the `ACCESS_TOKEN` environment variable.

{% raw %}
```yaml
Expand All @@ -307,9 +307,9 @@ steps:
env:
TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
git config --global url."https://${TOKEN}@github.com/github/foo".insteadOf "https://github.com/github/foo"
git config --global url."https://${TOKEN}@github.com/github/bar".insteadOf "https://github.com/github/bar"
git config --global url."https://${TOKEN}@github.com/github/baz".insteadOf "https://github.com/github/baz"
git config --global url."https://${TOKEN}@github.com/ghost/foo".insteadOf "https://github.com/ghost/foo"
git config --global url."https://${TOKEN}@github.com/ghost/bar".insteadOf "https://github.com/ghost/bar"
git config --global url."https://${TOKEN}@github.com/ghost/baz".insteadOf "https://github.com/ghost/baz"
```
{% endraw %}

Expand Down
Loading