Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
felicitymay authored Dec 20, 2024
2 parents be0cff5 + c44092c commit b799e7c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() {
Expand Down
3 changes: 3 additions & 0 deletions data/code-languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ shell:
sql:
name: SQL
comment: hyphen
swift:
name: Swift
comment: slash
text:
name: Text
comment: number
Expand Down
2 changes: 1 addition & 1 deletion data/reusables/actions/branch-requirement.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit b799e7c

Please sign in to comment.