Skip to content

Commit

Permalink
Merge branch 'main' into script-to-move-toc-links-into-frontmatter
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahs authored Mar 31, 2021
2 parents cdf807f + 9f04cc0 commit 1506960
Show file tree
Hide file tree
Showing 78 changed files with 847 additions and 457 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/help/desktop/cherry-picking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/notifications-v2/mobile-watch-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/repository/code-scanning-branch-filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/repository/code-scanning-click-alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/repository/code-scanning-filter-by-rule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion content/actions/reference/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ versions:

To set custom environment variables, you need to specify the variables in the workflow file. You can define environment variables for a step, job, or entire workflow using the [`jobs.<job_id>.steps[*].env`](/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv), [`jobs.<job_id>.env`](/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idenv), and [`env`](/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#env) keywords. For more information, see "[Workflow syntax for {% data variables.product.prodname_dotcom %}](/articles/workflow-syntax-for-github-actions/#jobsjob_idstepsenv)."

{% raw %}
```yaml
jobs:
weekday_job:
Expand All @@ -30,13 +31,14 @@ jobs:
DAY_OF_WEEK: Mon
steps:
- name: "Hello world when it's Monday"
if: env.DAY_OF_WEEK == 'Mon'
if: ${{ env.DAY_OF_WEEK == 'Mon' }}
run: echo "Hello $FIRST_NAME $middle_name $Last_Name, today is Monday!"
env:
FIRST_NAME: Mona
middle_name: The
Last_Name: Octocat
```
{% endraw %}
To use the value of an environment variable in a workflow file, you should use the [`env` context](/actions/reference/context-and-expression-syntax-for-github-actions#env-context). If you want to use the value of an environment variable inside a runner, you can use the runner operating system's normal method for reading environment variables.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@ You need write permission to view a summary of all the alerts for a repository o
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-security %}
{% data reusables.repositories.sidebar-code-scanning-alerts %}
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "[email protected]"%}
1. Optionally, use the drop-down menus to filter alerts. For example, you can filter by the tool that was used to identify alerts.
![Filter by tool](/assets/images/help/repository/code-scanning-filter-by-tool.png){% endif %}
1. Under "{% data variables.product.prodname_code_scanning_capc %}," click the alert you'd like to explore.
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "[email protected]"%}
![Summary of alerts](/assets/images/help/repository/code-scanning-click-alert.png)
{% else %}
![List of alerts from {% data variables.product.prodname_code_scanning %}](/assets/images/enterprise/3.1/help/repository/code-scanning-click-alert.png)
{% endif %}
1. Optionally, if the alert highlights a problem with data flow, click **Show paths** to display the path from the data source to the sink where it's used.
![The "Show paths" link on an alert](/assets/images/help/repository/code-scanning-show-paths.png)
1. Alerts from {% data variables.product.prodname_codeql %} analysis include a description of the problem. Click **Show more** for guidance on how to fix your code.
Expand All @@ -60,7 +67,11 @@ If you have write permission for a repository, you can view fixed alerts by view

Alerts may be fixed in one branch but not in another. You can use the "Branch" drop-down menu, on the summary of alerts, to check whether an alert is fixed in a particular branch.

{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "[email protected]"%}
![Filtering alerts by branch](/assets/images/help/repository/code-scanning-branch-filter.png)
{% else %}
![Filtering alerts by branch](/assets/images/enterprise/3.1/help/repository/code-scanning-branch-filter.png)
{% endif %}

{% if currentVersion == "[email protected]" %}

Expand Down Expand Up @@ -113,11 +124,19 @@ To dismiss or delete alerts:

Optionally, you can use the filters to display a subset of alerts and then delete all matching alerts at once. For example, if you have removed a query from {% data variables.product.prodname_codeql %} analysis, you can use the "Rule" filter to list just the alerts for that query and then select and delete all of those alerts.

{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "[email protected]"%}
![Filter alerts by rule](/assets/images/help/repository/code-scanning-filter-by-rule.png)
{% else %}
![Filter alerts by rule](/assets/images/enterprise/3.1/help/repository/code-scanning-filter-by-rule.png)
{% endif %}

1. If you want to dismiss an alert, it's important to explore the alert first, so that you can choose the correct dismissal reason. Click the alert you'd like to explore.

{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "[email protected]"%}
![Open an alert from the summary list](/assets/images/help/repository/code-scanning-click-alert.png)
{% else %}
![List of alerts from {% data variables.product.prodname_code_scanning %}](/assets/images/enterprise/3.1/help/repository/code-scanning-click-alert.png)
{% endif %}

1. Review the alert, then click **Dismiss** and choose a reason for closing the alert.
![Choosing a reason for dismissing an alert](/assets/images/help/repository/code-scanning-alert-close-drop-down.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ After setting up {% data variables.product.prodname_code_scanning %} for your re

**Note:** If you raised a pull request to add the {% data variables.product.prodname_code_scanning %} workflow to the repository, alerts from that pull request aren't displayed directly on the {% data variables.product.prodname_code_scanning_capc %} page until the pull request is merged. If any alerts were found you can view these, before the pull request is merged, by clicking the **_n_ alerts found** link in the banner on the {% data variables.product.prodname_code_scanning_capc %} page.

{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "[email protected]"%}
![Click the "n alerts found" link](/assets/images/help/repository/code-scanning-alerts-found-link.png)
{% else %}
![Click the "n alerts found" link](/assets/images/enterprise/3.1/help/repository/code-scanning-alerts-found-link.png)
{% endif %}

{% endnote %}

Expand All @@ -102,7 +106,11 @@ There are other situations where there may be no analysis for the latest commit

To check whether a branch has been scanned, go to the {% data variables.product.prodname_code_scanning_capc %} page, click the **Branch** drop-down and select the relevant branch.

{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "[email protected]"%}
![Choose a branch from the Branch drop-down menu](/assets/images/help/repository/code-scanning-branch-dropdown.png)
{% else %}
![Choose a branch from the Branch drop-down menu](/assets/images/enterprise/3.1/help/repository/code-scanning-branch-dropdown.png)
{% endif %}

The solution in this situation is to add the name of the base branch to the `on:push` and `on:pull_request` specification in the {% data variables.product.prodname_code_scanning %} workflow on that branch and then make a change that updates the open pull request that you want to scan.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ topics:
- repositories
---

{% data reusables.dependabot.beta-note %}

### About {% data variables.product.prodname_dependabot_version_updates %}

{% data variables.product.prodname_dependabot %} takes the effort out of maintaining your dependencies. You can use it to ensure that your repository automatically keeps up with the latest releases of the packages and applications it depends on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ topics:
- repositories
---

{% data reusables.dependabot.beta-note %}

### About the *dependabot.yml* file

The {% data variables.product.prodname_dependabot %} configuration file, *dependabot.yml*, uses YAML syntax. If you're new to YAML and want to learn more, see "[Learn YAML in five minutes](https://www.codeproject.com/Articles/1214409/Learn-YAML-in-five-minutes)."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ topics:
- repositories
---

{% data reusables.dependabot.beta-note %}

### About customizing dependency updates

After you've enabled version updates, you can customize how {% data variables.product.prodname_dependabot %} maintains your dependencies by adding further options to the *dependabot.yml* file. For example, you could:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ topics:
---
<!--Marketing-LINK: From /features/security/software-supply-chain page "About version updates for dependencies".-->

{% data reusables.dependabot.beta-note-no-link %}

### About version updates for dependencies

You enable {% data variables.product.prodname_dependabot_version_updates %} by checking a *dependabot.yml* configuration file in to your repository's `.github` directory. {% data variables.product.prodname_dependabot %} then raises pull requests to keep the dependencies you configure up-to-date. For each package manager's dependencies that you want to update, you must specify the location of the package manifest files and how often to check for updates to the dependencies listed in those files. For information about enabling security updates, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/github/managing-security-vulnerabilities/configuring-dependabot-security-updates)."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ topics:
- repositories
---

{% data reusables.dependabot.beta-note %}

### About {% data variables.product.prodname_dependabot_version_updates %} for actions

Actions are often updated with bug fixes and new features to make automated processes more reliable, faster, and safer. When you enable {% data variables.product.prodname_dependabot_version_updates %} for {% data variables.product.prodname_actions %}, {% data variables.product.prodname_dependabot %} will help ensure that references to actions in a repository's *workflow.yml* file are kept up to date. For each action in the file, {% data variables.product.prodname_dependabot %} checks the action's reference (typically a version number or commit identifier associated with the action) against the latest version. If a more recent version of the action is available, {% data variables.product.prodname_dependabot %} will send you a pull request that updates the reference in the workflow file to the latest version. For more information about {% data variables.product.prodname_dependabot_version_updates %}, see "[About {% data variables.product.prodname_dependabot_version_updates %}](/github/administering-a-repository/about-dependabot-version-updates)." For more information about configuring workflows for {% data variables.product.prodname_actions %}, see "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ topics:
- repositories
---

{% data reusables.dependabot.beta-note %}

### Viewing dependencies monitored by {% data variables.product.prodname_dependabot %}

After you've enabled version updates, you can confirm that your configuration is correct using the **{% data variables.product.prodname_dependabot %}** tab in the dependency graph for the repository. For more information, see "[Enabling and disabling version updates](/github/administering-a-repository/enabling-and-disabling-version-updates)."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ topics:
- repositories
---

{% data reusables.dependabot.beta-note %}

### About {% data variables.product.prodname_dependabot %} pull requests

{% data reusables.dependabot.pull-request-introduction %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ topics:
- security
---

{% data reusables.dependabot.beta-note %}

### About {% data variables.product.prodname_dependabot %} errors

{% data reusables.dependabot.pull-request-introduction %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Cherry-picking a commit
intro: You can pick a specific commit on one branch and copy the commit to another branch.
versions:
free-pro-team: '*'
---

### About Git cherry-pick

You can cherry-pick a commit on one branch to create a copy of the commit with the same changes on another branch. If you commit changes to the wrong branch or want to make the same changes to another branch, you can cherry-pick the commit to apply the changes to another branch. You can also use cherry-picking to apply specific changes before you are ready to create or merge a pull request. For example, if you commit a bug fix to a feature branch, you can cherry-pick the commit with the bug fix to other branches of your project.

You can also use cherry-picking when collaborating with a team. Some projects incorporate contributions by cherry-picking commits. For more information, see [Distributed Git - Maintaining a Project](https://git-scm.com/book/en/v2/Distributed-Git-Maintaining-a-Project#_rebase_cherry_pick) in the Git documentation.

### Cherry-picking a commit

{% data reusables.desktop.current-branch-menu %}
2. In the list of branches, click the branch that has the commit that you want to cherry-pick.
{% data reusables.desktop.history-tab %}
4. Drag the commit that you want to cherry-pick to the {% octicon "git-branch" aria-label="The branch icon" %} **Current Branch** menu and drop the commit on the branch that you want to copy the commit to.
![Dragging a commit to another branch in the Current Branch menu](/assets/images/help/desktop/cherry-picking.png)

### Further reading
- [git-cherry-pick](https://git-scm.com/docs/git-cherry-pick) in the Git documentation
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ versions:
{% link_in_list /stashing-changes %}
{% link_in_list /pushing-changes-to-github %}
{% link_in_list /reverting-a-commit %}
{% link_in_list /cherry-picking-a-commit %}
{% link_in_list /managing-tags %}
{% link_in_list /viewing-the-branch-history %}
{% topic_link_in_list /working-with-your-remote-repository-on-github-or-github-enterprise %}
Expand Down
6 changes: 0 additions & 6 deletions content/developers/overview/secret-scanning.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ When a match of your secret format is found in a public repository, a payload is

When a match of your secret format is found in a private repository configured for {% data variables.product.prodname_secret_scanning %}, then repository admins are alerted and can view and manage the {% data variables.product.prodname_secret_scanning %} results on {% data variables.product.prodname_dotcom %}. For more information, see "[Managing alerts from {% data variables.product.prodname_secret_scanning %}](/github/administering-a-repository/managing-alerts-from-secret-scanning)."

{% note %}

**Note:** {% data variables.product.prodname_secret_scanning_caps %} for private repositories is currently in beta.

{% endnote %}

This article describes how you can partner with {% data variables.product.prodname_dotcom %} as a service provider and join the {% data variables.product.prodname_secret_scanning %} program.

### The {% data variables.product.prodname_secret_scanning %} process
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,60 @@ Key | Type | Description
{{ webhookPayloadsForCurrentVersion.deployment_status }}
{% if currentVersion == "free-pro-team@latest" %}
### discussion
{% data reusables.webhooks.discussions-webhooks-beta %}
Activity related to a discussion. For more information, see the "[Using the GraphQL API for discussions](/graphql/guides/using-the-graphql-api-for-discussions)."
#### Availability
- Repository webhooks
- Organization webhooks
- {% data variables.product.prodname_github_app %}s with the `discussions` permission
#### Webhook payload object
Key | Type | Description
----|------|-------------
`action` |`string` | The action performed. Can be `created`, `edited`, `deleted`, `pinned`, `unpinned`, `locked`, `unlocked`, `transferred`, `category_changed`, `answered`, or `unanswered`.
{% data reusables.webhooks.discussion_desc %}
{% data reusables.webhooks.repo_desc_graphql %}
{% data reusables.webhooks.org_desc_graphql %}
{% data reusables.webhooks.sender_desc %}
#### Webhook payload example
{{ webhookPayloadsForCurrentVersion.discussion.created }}
### discussion_comment
{% data reusables.webhooks.discussions-webhooks-beta %}
Activity related to a comment in a discussion. For more information, see "[Using the GraphQL API for discussions](/graphql/guides/using-the-graphql-api-for-discussions)."
#### Availability
- Repository webhooks
- Organization webhooks
- {% data variables.product.prodname_github_app %}s with the `discussions` permission
#### Webhook payload object
Key | Type | Description
----|------|-------------
`action` |`string` | The action performed. Can be `created`, `edited`, or `deleted`.
`comment` | `object` | The [`discussion comment`](/graphql/guides/using-the-graphql-api-for-discussions#discussioncomment) resource.
{% data reusables.webhooks.discussion_desc %}
{% data reusables.webhooks.repo_desc_graphql %}
{% data reusables.webhooks.org_desc_graphql %}
{% data reusables.webhooks.sender_desc %}
#### Webhook payload example
{{ webhookPayloadsForCurrentVersion.discussion_comment.created }}
{% endif %}
{% if enterpriseServerVersions contains currentVersion or currentVersion == "github-ae@latest" %}
### enterprise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You need write permission to view a summary of all the alerts for a repository o
{% data reusables.repositories.sidebar-security %}
{% data reusables.repositories.sidebar-code-scanning-alerts %}
1. Under "{% data variables.product.prodname_code_scanning_capc %}," click the alert you'd like to explore.
![Summary of alerts](/assets/images/help/repository/code-scanning-click-alert.png)
![Summary of alerts](/assets/images/enterprise/3.1/help/repository/code-scanning-click-alert.png)
1. Optionally, if the alert highlights a problem with data flow, click **Show paths** to display the path from the data source to the sink where it's used.
![The "Show paths" link on an alert](/assets/images/help/repository/code-scanning-show-paths.png)
1. Alerts from {% data variables.product.prodname_codeql %} analysis include a description of the problem. Click **Show more** for guidance on how to fix your code.
Expand All @@ -52,7 +52,7 @@ If you have write permission for a repository, you can view fixed alerts by view

Alerts may be fixed in one branch but not in another. You can use the "Branch" drop-down menu, on the summary of alerts, to check whether an alert is fixed in a particular branch.

![Filtering alerts by branch](/assets/images/help/repository/code-scanning-branch-filter.png)
![Filtering alerts by branch](/assets/images/enterprise/3.1/help/repository/code-scanning-branch-filter.png)

{% if currentVersion == "[email protected]" %}

Expand Down Expand Up @@ -105,11 +105,11 @@ To dismiss or delete alerts:

Optionally, you can use the filters to display a subset of alerts and then delete all matching alerts at once. For example, if you have removed a query from {% data variables.product.prodname_codeql %} analysis, you can use the "Rule" filter to list just the alerts for that query and then select and delete all of those alerts.

![Filter alerts by rule](/assets/images/help/repository/code-scanning-filter-by-rule.png)
![Filter alerts by rule](/assets/images/enterprise/3.1/help/repository/code-scanning-filter-by-rule.png)

1. If you want to dismiss an alert, it's important to explore the alert first, so that you can choose the correct dismissal reason. Click the alert you'd like to explore.

![Open an alert from the summary list](/assets/images/help/repository/code-scanning-click-alert.png)
![Open an alert from the summary list](/assets/images/enterprise/3.1/help/repository/code-scanning-click-alert.png)

1. Review the alert, then click **Dismiss** and choose a reason for closing the alert.
![Choosing a reason for dismissing an alert](/assets/images/help/repository/code-scanning-alert-close-drop-down.png)
Expand Down
Loading

0 comments on commit 1506960

Please sign in to comment.