@@ -35,7 +35,7 @@ If you're new to SARIF and want to learn more, see Microsoft's [`SARIF tutorials
|
||||
|
||||
## Providing data to track {% data variables.product.prodname_code_scanning %} alerts across runs
|
||||
|
||||
Each time the results of a new code scan are uploaded, the results are processed and alerts are added to the repository. To prevent duplicate alerts for the same problem, {% data variables.product.prodname_code_scanning %} uses fingerprints to match results across various runs so they only appear once in the latest run for the selected branch. This makes it possible to match alerts to the correct line of code when files are edited. The `ruleID` for a result has to be the same across analysis.
|
||||
Each time the results of a new code scan are uploaded, the results are processed and alerts are added to the repository. To prevent duplicate alerts for the same problem, {% data variables.product.prodname_code_scanning %} uses fingerprints to match results across various runs so they only appear once in the latest run for the selected branch. This makes it possible to match alerts to the correct line of code when files are edited. The `ruleId` for a result has to be the same across analysis.
|
||||
|
||||
### Reporting consistent filepaths
|
||||
|
||||
@@ -536,7 +536,7 @@ This SARIF output file has example values to show all supported SARIF properties
|
||||
{
|
||||
"ruleId": "R01",
|
||||
"message": {
|
||||
"text": "Specifying both [ruleIndex](1) and [ruleID](2) might lead to inconsistencies."
|
||||
"text": "Specifying both [ruleIndex](1) and [ruleId](2) might lead to inconsistencies."
|
||||
},
|
||||
"level": "error",
|
||||
"locations": [
|
||||
|
||||
@@ -445,8 +445,8 @@ This guide demonstrates how to get coding suggestions from {% data variables.pro
|
||||
{% data variables.product.prodname_copilot %} offers coding suggestions as you type. For example, type this function
|
||||
signature in a Swift file:
|
||||
|
||||
```shell copy
|
||||
func CalculateDaysBetweenDates(
|
||||
```swift copy
|
||||
func calculateDaysBetweenDates(
|
||||
```
|
||||
|
||||
{% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text. To accept the first line of a suggestion, press <kbd>Tab</kbd>. To view the full suggestion, hold <kbd>Option</kbd>, and to accept the full suggestion, press <kbd>Option</kbd>+<kbd>Tab</kbd>.
|
||||
|
||||
@@ -66,6 +66,9 @@ This will display the code block with syntax highlighting:
|
||||
|
||||

|
||||
|
||||
> [!TIP]
|
||||
> When you create a fenced code block that you also want to have syntax highlighting on a GitHub Pages site, use lower-case language identifiers. For more information, see [AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#syntax-highlighting).
|
||||
|
||||
We use [Linguist](https://github.com/github-linguist/linguist) to perform language detection and to select [third-party grammars](https://github.com/github-linguist/linguist/blob/main/vendor/README.md) for syntax highlighting. You can find out which keywords are valid in [the languages YAML file](https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml).
|
||||
|
||||
## Creating diagrams
|
||||
|
||||
@@ -110,6 +110,9 @@ To make your site easier to read, code snippets are highlighted on {% data varia
|
||||
|
||||
By default, code blocks on your site will be highlighted by Jekyll. Jekyll uses the [Rouge](https://github.com/rouge-ruby/rouge) highlighter (which is compatible with [Pygments](https://pygments.org/)). If you specify Pygments in your `_config.yml` file, Rouge will be used as the fallback instead. Jekyll cannot use any other syntax highlighter, and you'll get a page build warning if you specify another syntax highlighter in your `_config.yml` file. For more information, see [AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/about-jekyll-build-errors-for-github-pages-sites).
|
||||
|
||||
> [!NOTE]
|
||||
> Rouge only recognizes lower-case language identifiers for fenced code blocks. For a list of supported languages, see [Languages](https://rouge-ruby.github.io/docs/file.Languages.html).
|
||||
|
||||
If you want to use another highlighter, such as [highlight.js](https://github.com/highlightjs/highlight.js), you must disable Jekyll's syntax highlighting by updating your project's `_config.yml` file.
|
||||
|
||||
```yaml
|
||||
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: '18.x'
|
||||
node-version: '20.x'
|
||||
|
||||
# This step installs the octokit library. The script that this workflow will run uses the octokit library.
|
||||
- name: Install dependencies
|
||||
@@ -98,18 +98,18 @@ jobs:
|
||||
WORKFLOW_REPO: {% raw %}${{ github.event.repository.name }}{% endraw %}
|
||||
WORKFLOW_REPO_OWNER: {% raw %}${{ github.repository_owner }}{% endraw %}
|
||||
run: |
|
||||
node .github/workflows/scripts/redeliver-failed-deliveries.js
|
||||
node .github/workflows/scripts/redeliver-failed-deliveries.mjs
|
||||
```
|
||||
|
||||
## Adding the script
|
||||
|
||||
This section demonstrates how you can write a script to find and redeliver failed deliveries.
|
||||
|
||||
Copy this script into a file called `.github/workflows/scripts/redeliver-failed-deliveries.js` in the same repository where you saved the {% data variables.product.prodname_actions %} workflow file above.
|
||||
Copy this script into a file called `.github/workflows/scripts/redeliver-failed-deliveries.mjs` in the same repository where you saved the {% data variables.product.prodname_actions %} workflow file above.
|
||||
|
||||
```javascript copy annotate
|
||||
// This script uses {% data variables.product.company_short %}'s Octokit SDK to make API requests. For more information, see "[AUTOTITLE](/rest/guides/scripting-with-the-rest-api-and-javascript)."
|
||||
const { App, Octokit } = require("octokit");
|
||||
import { App, Octokit } from "octokit";
|
||||
|
||||
//
|
||||
async function checkAndRedeliverWebhooks() {
|
||||
|
||||
@@ -61,6 +61,9 @@ shell:
|
||||
sql:
|
||||
name: SQL
|
||||
comment: hyphen
|
||||
swift:
|
||||
name: Swift
|
||||
comment: slash
|
||||
text:
|
||||
name: Text
|
||||
comment: number
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
> [!NOTE]
|
||||
> This event will only trigger a workflow run if the workflow file is on the default branch.
|
||||
> This event will only trigger a workflow run if the workflow file exists on the default branch.
|
||||
|
||||
Reference in New Issue
Block a user