Skip to content

Commit f170902

Browse files
authored
sync: update 5 files from source repository (#48)
1 parent 5739f8a commit f170902

File tree

5 files changed

+24
-19
lines changed

5 files changed

+24
-19
lines changed

.github/SECURITY.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ Security is a priority. We maintain a proactive stance to identify and fix vulne
55
<br/>
66

77
## 🛠️ Supported & Maintained Versions
8-
9-
| Version | Status |
10-
|---------|----------------------|
11-
| 0.x.x | ✅ Supported & Active |
12-
| 1.x.x | ✅ Supported & Active |
8+
Any released version of **go-subtree** that is not marked as deprecated is actively supported and maintained.
139

1410
<br/>
1511

@@ -70,7 +66,7 @@ We follow the [OpenSSF](https://openssf.org) best practices to ensure this repos
7066

7167
To proactively protect this repository, we use several automated GitHub workflows:
7268

73-
- **[CodeQL Analysis](./workflows/codeql-analysis.yml)**: Scans the codebase for security vulnerabilities and coding errors using GitHub's CodeQL engine on every push and pull request to the `master` branch.
74-
- **[OpenSSF Scorecard](./workflows/scorecard.yml)**: Periodically evaluates the repository against OpenSSF Scorecard checks, providing insights and recommendations for improving supply chain security and best practices.
69+
- **[CodeQL Analysis](./github/workflows/codeql-analysis.yml)**: Scans the codebase for security vulnerabilities and coding errors using GitHub's CodeQL engine on every push and pull request to the `main/master` branch.
70+
- **[OpenSSF Scorecard](./github/workflows/scorecard.yml)**: Periodically evaluates the repository against OpenSSF Scorecard checks, providing insights and recommendations for improving supply chain security and best practices.
7571

76-
These workflows help us identify, remediate, and prevent security issues as early as possible in the development lifecycle. For more details, see the workflow files in the [`.github/workflows/`](https://github.com/bsv-blockchain/go-subtree/tree/master/.github/workflows) directory.
72+
These workflows help us identify, remediate, and prevent security issues as early as possible in the development lifecycle. For more details, see the workflow files in the [`.github/workflows/`](.github/workflows) directory.

.github/tech-conventions/dependency-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ brew install gitleaks
4242
gitleaks detect --source . --log-opts="--all" --verbose
4343
```
4444

45-
* Address critical advisories before merging changes into `master`
45+
* Address critical advisories before merging changes into `main/master`
4646

4747
* Document any intentionally ignored vulnerabilities with clear justification and issue tracking
4848

.github/tech-conventions/labeling-conventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> Labels serve as shared vocabulary for categorizing issues, pull requests, and discussions. Proper labeling improves triage, prioritization, automation, and clarity across the engineering lifecycle.
44
5-
Current labels are located in `.github/labels.yml` and automatically synced into GitHub upon updating the `master` branch.
5+
Current labels are located in `.github/labels.yml` and automatically synced into GitHub upon updating the `main/master` branch.
66

77
<br><br>
88

.github/workflows/fortress-coverage.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,17 @@ jobs:
365365
--jq ".workflow_runs[] | select(.status == \"completed\" and (.conclusion == \"success\" or .conclusion == \"failure\") and .head_branch == \"$CURRENT_BRANCH\") | .id" \
366366
--paginate 2>/dev/null | head -8 || echo "")
367367
368-
# If no runs found for current branch and it's not master, also get master branch history
369-
if [[ -z "$WORKFLOW_RUNS" ]] && [[ "$CURRENT_BRANCH" != "master" ]]; then
370-
echo "ℹ️ No history found for branch '$CURRENT_BRANCH', checking master branch..."
371-
WORKFLOW_RUNS=$(gh api repos/${{ github.repository }}/actions/runs \
372-
--jq '.workflow_runs[] | select(.status == "completed" and (.conclusion == "success" or .conclusion == "failure") and .head_branch == "master") | .id' \
373-
--paginate 2>/dev/null | head -5 || echo "")
368+
# If no runs found for current branch and it's not the default branch, check default branch history
369+
if [[ -z "$WORKFLOW_RUNS" ]]; then
370+
# Detect the default branch dynamically
371+
DEFAULT_BRANCH=$(gh api repos/${{ github.repository }} --jq '.default_branch' 2>/dev/null || echo "")
372+
373+
if [[ -n "$DEFAULT_BRANCH" ]] && [[ "$CURRENT_BRANCH" != "$DEFAULT_BRANCH" ]]; then
374+
echo "ℹ️ No history found for branch '$CURRENT_BRANCH', checking $DEFAULT_BRANCH branch..."
375+
WORKFLOW_RUNS=$(gh api repos/${{ github.repository }}/actions/runs \
376+
--jq ".workflow_runs[] | select(.status == \"completed\" and (.conclusion == \"success\" or .conclusion == \"failure\") and .head_branch == \"$DEFAULT_BRANCH\") | .id" \
377+
--paginate 2>/dev/null | head -5 || echo "")
378+
fi
374379
fi
375380
376381
if [[ -z "$WORKFLOW_RUNS" ]]; then
@@ -922,7 +927,7 @@ jobs:
922927
GITHUB_SHA: ${{ inputs.commit-sha || github.event.pull_request.head.sha }}
923928
GITHUB_REF_NAME: ${{ inputs.branch-name || github.event.pull_request.head.ref }}
924929
GITHUB_HEAD_REF: ${{ github.event.pull_request.head.ref }}
925-
GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref || 'master' }}
930+
GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref || github.event.repository.default_branch }}
926931
COVERAGE_PR_COMMENT_BEHAVIOR: ${{ env.COVERAGE_PR_COMMENT_BEHAVIOR }}
927932
COVERAGE_LOG_LEVEL: debug
928933
run: |

.vscode/tasks.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
"default": "master",
1515
"description": "Target branch for version bump",
1616
"id": "targetBranch",
17-
"type": "promptString"
17+
"options": [
18+
"master",
19+
"main"
20+
],
21+
"type": "pickString"
1822
},
1923
{
2024
"default": "cancel",
@@ -675,7 +679,7 @@
675679
"type": "shell"
676680
},
677681
{
678-
"command": "magex version:bump push=true bump=major branch=${input:targetBranch} confirm=${input:majorConfirm}",
682+
"command": "magex version:bump push=true bump=major branch=${input:targetBranch} ${input:majorConfirm}",
679683
"detail": "Bump major version (X.0.0) and push to remote - requires confirmation",
680684
"group": "none",
681685
"label": "magex: version:bump:major",

0 commit comments

Comments
 (0)