Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/DISCUSSION_TEMPLATE/q-and-a.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
title: "[Question] "
labels: ["question"]
body:
- type: markdown
attributes:
value: |
Welcome! Use this space to ask questions, share how your use-case, or explore ideas with the community.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix wording typo in the intro copy.

Line 7 has a grammar issue: “share how your use-case” reads incorrectly and may confuse reporters.

✏️ Suggested copy fix
-        Welcome! Use this space to ask questions, share how your use-case, or explore ideas with the community.
+        Welcome! Use this space to ask questions, share your use case, or explore ideas with the community.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Welcome! Use this space to ask questions, share how your use-case, or explore ideas with the community.
Welcome! Use this space to ask questions, share your use case, or explore ideas with the community.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/DISCUSSION_TEMPLATE/q-and-a.yml at line 7, Replace the awkward
phrase "share how your use-case" in the intro copy with clearer wording; update
the sentence "Welcome! Use this space to ask questions, share how your use-case,
or explore ideas with the community." to read something like "Welcome! Use this
space to ask questions, share your use case, or explore ideas with the
community." to fix the grammar and improve clarity.


- type: textarea
id: question
attributes:
label: Your Question or Topic
description: What would you like to discuss?
validations:
required: true

- type: textarea
id: context
attributes:
label: Context
description: Any relevant code, configuration, or background that helps frame your question.
placeholder: |
```python
# your code snippet here
```
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Bug Report
description: Report a bug or unexpected behaviour
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug. Please fill out the sections below.

- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of what the bug is.
placeholder: What happened?
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: Minimal steps to reproduce the behaviour.
placeholder: |
1. Run `make ...`
2. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behaviour
description: What did you expect to happen?
validations:
required: true

- type: textarea
id: environment
attributes:
label: Environment
description: |
Relevant versions and system info. Run `make info` if available.
placeholder: |
- OS: macOS 14 / Ubuntu 24.04 / Windows 11
- Python: 3.13.x
- rhiza version:
validations:
required: false

- type: textarea
id: context
attributes:
label: Additional context
description: Logs, screenshots, or anything else that may be helpful.
validations:
required: false
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Feature Request
description: Suggest a new feature or enhancement
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for proposing a feature. Please align with the team before investing significant effort.

- type: textarea
id: problem
attributes:
label: Problem / motivation
description: What problem does this solve? Why is it valuable?
placeholder: As a contributor I find it hard to ... because ...
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed solution
description: Describe the solution you have in mind.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Other approaches you have considered and why you ruled them out.
validations:
required: false

- type: textarea
id: context
attributes:
label: Additional context
description: Links, mockups, prior art, or anything else that may be helpful.
validations:
required: false
80 changes: 80 additions & 0 deletions .github/actions/configure-git-auth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Configure Git Auth for Private Packages

This composite action configures git to use token authentication for private GitHub packages.

## Usage

Add this step before installing dependencies that include private GitHub packages:

```yaml
- name: Configure git auth for private packages
uses: ./.github/actions/configure-git-auth
with:
token: ${{ secrets.GH_PAT }}
```

The `GH_PAT` secret should be a Personal Access Token with `repo` scope.

## What It Does

This action runs:

```bash
git config --global url."https://<token>@github.com/".insteadOf "https://github.com/"
```

This tells git to automatically inject the token into all HTTPS GitHub URLs, enabling access to private repositories.

## When to Use

Use this action when your project has dependencies defined in `pyproject.toml` like:

```toml
[tool.uv.sources]
private-package = { git = "https://github.com/your-org/private-package.git", rev = "v1.0.0" }
```

## Token Requirements

By default, this action will use the workflow’s built-in `GITHUB_TOKEN` (`github.token`) if no `token` input is provided or if the provided value is empty (it uses `inputs.token || github.token` internally).

The `GITHUB_TOKEN` is usually sufficient when:

- installing dependencies hosted in the **same repository** as the workflow, or
- accessing **public** repositories.

The default `GITHUB_TOKEN` typically does **not** have permission to read other private repositories, even within the same organization. For that scenario, you should create a Personal Access Token (PAT) with `repo` scope and store it as `secrets.GH_PAT`, then pass it to the action via the `token` input.

If you configure the step as in the example (`token: ${{ secrets.GH_PAT }}`) and `secrets.GH_PAT` is not defined, GitHub Actions passes an empty string to the action. The composite action then falls back to `github.token`, so the configuration step itself still succeeds. However, any subsequent step that tries to access private repositories that are not covered by the permissions of `GITHUB_TOKEN` will fail with an authentication error.
## Example Workflow

```yaml
name: CI

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Configure git auth for private packages
uses: ./.github/actions/configure-git-auth
with:
token: ${{ secrets.GH_PAT }}

- name: Install dependencies
run: uv sync --frozen

- name: Run tests
run: uv run pytest
```

## See Also

- [PRIVATE_PACKAGES.md](../../../.rhiza/docs/PRIVATE_PACKAGES.md) - Complete guide to using private packages
- [TOKEN_SETUP.md](../../../.rhiza/docs/TOKEN_SETUP.md) - Setting up Personal Access Tokens
Comment on lines +79 to +80
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify referenced documentation files exist
echo "Checking for referenced documentation files..."
for file in ".rhiza/docs/PRIVATE_PACKAGES.md" ".rhiza/docs/TOKEN_SETUP.md"; do
  if [ -f "$file" ]; then
    echo "✓ Found: $file"
  else
    echo "✗ Missing: $file"
  fi
done

Repository: tschm/cs

Length of output: 179


🏁 Script executed:

#!/bin/bash
# Check if .rhiza directory exists and its contents
echo "=== Checking .rhiza directory structure ==="
if [ -d ".rhiza" ]; then
  echo "✓ .rhiza directory exists"
  echo ""
  echo "Contents of .rhiza:"
  find .rhiza -type f -o -type d | head -50
else
  echo "✗ .rhiza directory does not exist"
fi

echo ""
echo "=== Searching for PRIVATE_PACKAGES and TOKEN_SETUP mentions ==="
rg "PRIVATE_PACKAGES|TOKEN_SETUP" --type md --type txt 2>/dev/null | head -20

Repository: tschm/cs

Length of output: 677


🏁 Script executed:

#!/bin/bash
# Check for docs directory at repository root and search for documentation files
echo "=== Checking for docs directory at repo root ==="
if [ -d "docs" ]; then
  echo "✓ docs directory exists at repo root"
  ls -la docs/ | head -20
else
  echo "✗ No docs directory at repo root"
fi

echo ""
echo "=== Checking for any .md files in .rhiza ==="
find .rhiza -name "*.md" -type f

echo ""
echo "=== Searching all markdown files for PRIVATE_PACKAGES or TOKEN_SETUP ==="
rg "PRIVATE_PACKAGES|TOKEN_SETUP" 2>/dev/null || echo "No matches found"

Repository: tschm/cs

Length of output: 655


🏁 Script executed:

#!/bin/bash
# Examine the README file directly to see the context
echo "=== Content of .github/actions/configure-git-auth/README.md (lines 70-85) ==="
sed -n '70,85p' ".github/actions/configure-git-auth/README.md"

echo ""
echo "=== Check if .rhiza/docs directory exists ==="
if [ -d ".rhiza/docs" ]; then
  echo "✓ .rhiza/docs exists"
  ls -la .rhiza/docs/
else
  echo "✗ .rhiza/docs does not exist"
fi

echo ""
echo "=== Search entire codebase for any PRIVATE_PACKAGES or TOKEN_SETUP content ==="
git grep -l "PRIVATE_PACKAGES\|TOKEN_SETUP" 2>/dev/null || echo "No git matches found"

echo ""
echo "=== Check git history for these files ==="
git log --all --full-history -- ".rhiza/docs/PRIVATE_PACKAGES.md" ".rhiza/docs/TOKEN_SETUP.md" 2>/dev/null | head -20 || echo "No git history found"

Repository: tschm/cs

Length of output: 1072


🏁 Script executed:

#!/bin/bash
# Check rhiza_sync.yml for context
echo "=== Content of .github/workflows/rhiza_sync.yml ==="
cat .github/workflows/rhiza_sync.yml

echo ""
echo "=== Check .rhiza/history for these files ==="
cat .rhiza/history | grep -i "PRIVATE_PACKAGES\|TOKEN_SETUP" || echo "No matches in history file"

echo ""
echo "=== List all files in .rhiza/history ==="
wc -l .rhiza/history && head -50 .rhiza/history

Repository: tschm/cs

Length of output: 7476


Remove or update incorrect documentation references.

The README links to .rhiza/docs/PRIVATE_PACKAGES.md and .rhiza/docs/TOKEN_SETUP.md, but the .rhiza/docs directory doesn't exist. TOKEN_SETUP.md is listed as a template-managed file in .rhiza/history but is missing from the repository (likely excluded by template sync), and PRIVATE_PACKAGES.md is not part of the Rhiza template at all. Either remove these broken links or restore the files from the template.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/actions/configure-git-auth/README.md around lines 79 - 80, The
README contains broken links to .rhiza/docs/PRIVATE_PACKAGES.md and
.rhiza/docs/TOKEN_SETUP.md; either remove those link lines from the README or
replace them with correct existing documentation references (or restore the
missing TEMPLATE files into the repo). Edit the README entry that currently
lists "[PRIVATE_PACKAGES.md] ... [TOKEN_SETUP.md]" and remove both links if no
replacement docs exist, or update the target paths to the correct docs that do
exist in the repository (or ensure TOKEN_SETUP.md is added back if intended to
be present).

21 changes: 21 additions & 0 deletions .github/actions/configure-git-auth/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Configure Git Auth for Private Packages'
description: 'Configure git to use token authentication for private GitHub packages'

inputs:
token:
description: 'GitHub token to use for authentication'
required: false

runs:
using: composite
steps:
- name: Configure git authentication
shell: bash
env:
GH_TOKEN: ${{ inputs.token || github.token }}
run: |
# Configure git to use token authentication for GitHub URLs
# This allows uv/pip to install private packages from GitHub
git config --global url."https://${GH_TOKEN}@github.com/".insteadOf "https://github.com/"
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This composite action configures git with https://${GH_TOKEN}@github.com/, which treats the token as the username with an empty password and typically won’t authenticate to private repos. Use the standard pattern that passes the token as the password (e.g., https://x-access-token:${GH_TOKEN}@github.com/) to ensure dependency installs from private GitHub repos work.

Suggested change
git config --global url."https://${GH_TOKEN}@github.com/".insteadOf "https://github.com/"
git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/"

Copilot uses AI. Check for mistakes.

echo "✓ Git configured to use token authentication for GitHub"
Loading