-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- What / Why --> <!-- Describe the request in detail. What it does and why it's being changed. --> `steps.metadata.outputs.directory` is set to `/main`, not `/`, when `package.json` is at the root of the repository. I suspect adding `target-branch` to `dependabot.yml` (#330) added a `main` segment to Dependabot PR branch names, which changed the value of `steps.metadata.outputs.directory`. By fixing this issue, we shouldn't need to routinely use stafftools to fix up template-oss Dependabot PRs. 🤞🏼 I couldn't quickly find a `bump @npmcli/template-oss` Dependabot PR for a workspace to inspect `steps.metadata.outputs.directory` and fix workspaces support. If that's important, we may want to either enable Dependabot for `npm/cli` or create a separate `template-oss-test` repo. It's not clear if Dependabot will create a PR for `workspace/test-workspace` upon our next release. ### Example Dependabot PR branch names The first PR updates just `@npmcli/template-oss`. The second updates multiple dependencies including `@npmcli/template-oss`. PR | branch name | segments | steps.metadata.outputs.directory -|-|-|- npm/agent#110 | `dependabot/npm_and_yarn/main/npmcli/template-oss-4.23.0` | 5 | `/main` npm/statusboard#877 | `dependabot/npm_and_yarn/main/dependency-updates-4de8b5bfcf` | 4 | `/` ## References <!-- Examples: Related to #0 Depends on #0 Blocked by #0 Fixes #0 Closes #0 --> Failed "Post Dependabot" run: https://github.com/npm/agent/actions/runs/9963674341/job/27530225303 Fix manually tested here: npm/agent@ef85b08 [branchNameToDirectoryName](https://github.com/dependabot/fetch-metadata/blob/ffa2dc8ffecf17d26f6a81b83f9ef5edd33ba93a/src/dependabot/update_metadata.ts#L31) Bug report: dependabot/fetch-metadata#540
- Loading branch information
1 parent
9acf69e
commit ca47705
Showing
10 changed files
with
21 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
GitHub takes the security of our software products and services seriously, including the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub). | ||
|
||
If you believe you have found a security vulnerability in this GitHub-owned open source repository, you can report it to us in one of two ways. | ||
If you believe you have found a security vulnerability in this GitHub-owned open source repository, you can report it to us in one of two ways. | ||
|
||
If the vulnerability you have found is *not* [in scope for the GitHub Bug Bounty Program](https://bounty.github.com/#scope) or if you do not wish to be considered for a bounty reward, please report the issue to us directly through [[email protected]](mailto:[email protected]). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
GitHub takes the security of our software products and services seriously, including the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub). | ||
|
||
If you believe you have found a security vulnerability in this GitHub-owned open source repository, you can report it to us in one of two ways. | ||
If you believe you have found a security vulnerability in this GitHub-owned open source repository, you can report it to us in one of two ways. | ||
|
||
If the vulnerability you have found is *not* [in scope for the GitHub Bug Bounty Program](https://bounty.github.com/#scope) or if you do not wish to be considered for a bounty reward, please report the issue to us directly through [[email protected]](mailto:[email protected]). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,7 @@ runs: | |
with: | ||
result-encoding: string | ||
script: | | ||
const { repo: { owner, repo}, runId, serverUrl } = context | ||
const { repo: { owner, repo}, runId, serverUrl } = context | ||
const { JOB_NAME, SHA } = process.env | ||
const job = await github.rest.actions.listJobsForWorkflowRun({ | ||
|
@@ -146,7 +146,7 @@ runs: | |
MATCH=$SPEC | ||
echo "Found compatible version: npm@$MATCH" | ||
break | ||
fi | ||
fi | ||
done | ||
if [ -z $MATCH ]; then | ||
|
@@ -725,7 +725,7 @@ jobs: | |
id: flags | ||
run: | | ||
dependabot_dir="\${{ steps.metadata.outputs.directory }}" | ||
if [[ "$dependabot_dir" == "/" ]]; then | ||
if [[ "$dependabot_dir" == "/" || "$dependabot_dir" == "/main" ]]; then | ||
echo "workspace=-iwr" >> $GITHUB_OUTPUT | ||
else | ||
# strip leading slash from directory so it works as a | ||
|
@@ -1414,7 +1414,7 @@ SECURITY.md | |
GitHub takes the security of our software products and services seriously, including the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub). | ||
If you believe you have found a security vulnerability in this GitHub-owned open source repository, you can report it to us in one of two ways. | ||
If you believe you have found a security vulnerability in this GitHub-owned open source repository, you can report it to us in one of two ways. | ||
If the vulnerability you have found is *not* [in scope for the GitHub Bug Bounty Program](https://bounty.github.com/#scope) or if you do not wish to be considered for a bounty reward, please report the issue to us directly through [[email protected]](mailto:[email protected]). | ||
|
@@ -1512,7 +1512,7 @@ runs: | |
with: | ||
result-encoding: string | ||
script: | | ||
const { repo: { owner, repo}, runId, serverUrl } = context | ||
const { repo: { owner, repo}, runId, serverUrl } = context | ||
const { JOB_NAME, SHA } = process.env | ||
const job = await github.rest.actions.listJobsForWorkflowRun({ | ||
|
@@ -1586,7 +1586,7 @@ runs: | |
MATCH=$SPEC | ||
echo "Found compatible version: npm@$MATCH" | ||
break | ||
fi | ||
fi | ||
done | ||
if [ -z $MATCH ]; then | ||
|
@@ -2383,7 +2383,7 @@ jobs: | |
id: flags | ||
run: | | ||
dependabot_dir="\${{ steps.metadata.outputs.directory }}" | ||
if [[ "$dependabot_dir" == "/" ]]; then | ||
if [[ "$dependabot_dir" == "/" || "$dependabot_dir" == "/main" ]]; then | ||
echo "workspace=-iwr" >> $GITHUB_OUTPUT | ||
else | ||
# strip leading slash from directory so it works as a | ||
|
@@ -3099,7 +3099,7 @@ SECURITY.md | |
GitHub takes the security of our software products and services seriously, including the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub). | ||
If you believe you have found a security vulnerability in this GitHub-owned open source repository, you can report it to us in one of two ways. | ||
If you believe you have found a security vulnerability in this GitHub-owned open source repository, you can report it to us in one of two ways. | ||
If the vulnerability you have found is *not* [in scope for the GitHub Bug Bounty Program](https://bounty.github.com/#scope) or if you do not wish to be considered for a bounty reward, please report the issue to us directly through [[email protected]](mailto:[email protected]). | ||
|
@@ -3300,7 +3300,7 @@ runs: | |
with: | ||
result-encoding: string | ||
script: | | ||
const { repo: { owner, repo}, runId, serverUrl } = context | ||
const { repo: { owner, repo}, runId, serverUrl } = context | ||
const { JOB_NAME, SHA } = process.env | ||
const job = await github.rest.actions.listJobsForWorkflowRun({ | ||
|
@@ -3374,7 +3374,7 @@ runs: | |
MATCH=$SPEC | ||
echo "Found compatible version: npm@$MATCH" | ||
break | ||
fi | ||
fi | ||
done | ||
if [ -z $MATCH ]; then | ||
|
@@ -3907,7 +3907,7 @@ jobs: | |
id: flags | ||
run: | | ||
dependabot_dir="\${{ steps.metadata.outputs.directory }}" | ||
if [[ "$dependabot_dir" == "/" ]]; then | ||
if [[ "$dependabot_dir" == "/" || "$dependabot_dir" == "/main" ]]; then | ||
echo "workspace=-iwr" >> $GITHUB_OUTPUT | ||
else | ||
# strip leading slash from directory so it works as a | ||
|