Skip to content

Commit 42a458d

Browse files
Merge branch 'main' into improve-env
2 parents 3a2b347 + 340edb6 commit 42a458d

24 files changed

+725
-476
lines changed

.github/workflows/docker_image.yml

Lines changed: 69 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,82 @@
1-
name: Build Docker Image
2-
1+
name: Build & Push Container
32
on:
3+
push:
4+
branches:
5+
- 'main'
6+
tags:
7+
- '*'
8+
merge_group:
49
pull_request:
5-
branches: [ main ]
6-
workflow_dispatch:
10+
types: [assigned, opened, synchronize, reopened]
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
14+
cancel-in-progress: true
15+
16+
env:
17+
REGISTRY: ghcr.io
18+
IMAGE_NAME: ${{ github.repository }}
719

820
jobs:
9-
docker:
21+
docker-build:
1022
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
packages: write
26+
attestations: write
27+
id-token: write
1128
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v4
29+
- uses: actions/checkout@v4
30+
31+
- name: Set current timestamp
32+
id: vars
33+
run: |
34+
echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT
35+
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
36+
37+
- name: Log in to the Container registry
38+
uses: docker/login-action@v3
39+
with:
40+
registry: ${{ env.REGISTRY }}
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
44+
- name: Docker Meta
45+
id: meta
46+
uses: docker/metadata-action@v5
47+
with:
48+
images: |
49+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
50+
flavor: |
51+
latest=false
52+
tags: |
53+
type=ref,event=branch,branch=main
54+
type=ref,event=branch,branch=main,suffix=-${{ steps.vars.outputs.sha_short }}-${{ steps.vars.outputs.timestamp }}
55+
type=pep440,pattern={{raw}}
56+
type=ref,event=pr
57+
58+
- name: Set up QEMU
59+
uses: docker/setup-qemu-action@v3
1460

1561
- name: Set up Docker Buildx
1662
uses: docker/setup-buildx-action@v3
1763

18-
- name: Build
64+
- name: Build and push
1965
uses: docker/build-push-action@v6
66+
id: push
2067
with:
21-
push: false
2268
context: .
23-
file: Dockerfile
24-
tags: "${{ github.sha }}"
69+
platforms: linux/amd64, linux/arm64
70+
push: ${{ github.event_name != 'pull_request' }}
71+
tags: ${{ steps.meta.outputs.tags }}
72+
labels: ${{ steps.meta.outputs.labels }}
73+
cache-from: type=gha
74+
cache-to: type=gha,mode=max
75+
76+
- name: Generate artifact attestation
77+
if: github.event_name != 'pull_request'
78+
uses: actions/attest-build-provenance@v2
79+
with:
80+
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
81+
subject-digest: ${{ steps.push.outputs.digest }}
82+
push-to-registry: true

.github/workflows/pr-title-check.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: PR Conventional Commit Validation
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
6+
7+
jobs:
8+
validate-pr-title:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: PR Conventional Commit Validation
12+
uses: ytanikin/pr-conventional-commits@1.4.0
13+
with:
14+
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]'
15+
add_label: 'false'

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ If you ever get stuck, reach out on [Discord](https://discord.com/invite/zerRaGK
88
## How to Contribute (non-technical)
99

1010
- **Create an Issue** – found a bug or have a feature idea?
11-
[Open an issue](https://github.com/cyclotruc/gitingest/issues/new).
11+
[Open an issue](https://github.com/coderamp-labs/gitingest/issues/new).
1212
- **Spread the Word** – tweet, blog, or tell a friend.
1313
- **Use Gitingest** – real-world usage gives the best feedback. File issues or ping us on [Discord](https://discord.com/invite/zerRaGK9EC) with anything you notice.
1414

@@ -23,7 +23,7 @@ If you ever get stuck, reach out on [Discord](https://discord.com/invite/zerRaGK
2323
2. **Clone** your fork:
2424

2525
```bash
26-
git clone https://github.com/cyclotruc/gitingest.git
26+
git clone https://github.com/coderamp-labs/gitingest.git
2727
cd gitingest
2828
```
2929

Dockerfile

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,45 @@
11
# Stage 1: Install Python dependencies
22
FROM python:3.13-slim AS python-builder
3+
34
WORKDIR /build
45

5-
# System build tools
6-
RUN apt-get update \
7-
&& apt-get install -y --no-install-recommends gcc python3-dev \
8-
&& rm -rf /var/lib/apt/lists/*
6+
RUN set -eux; \
7+
apt-get update; \
8+
apt-get install -y --no-install-recommends gcc python3-dev; \
9+
rm -rf /var/lib/apt/lists/*
910

10-
# Metadata and code that setuptools needs
1111
COPY pyproject.toml .
1212
COPY src/ ./src/
1313

14-
# Install runtime dependencies defined in pyproject.toml
15-
RUN pip install --no-cache-dir --upgrade pip \
16-
&& pip install --no-cache-dir --timeout 1000 .
17-
14+
RUN set -eux; \
15+
pip install --no-cache-dir --upgrade pip; \
16+
pip install --no-cache-dir --timeout 1000 .
1817

1918
# Stage 2: Runtime image
2019
FROM python:3.13-slim
21-
LABEL org.opencontainers.image.source="https://github.com/cyclotruc/gitingest"
2220

23-
# Minimal runtime utilities
24-
RUN apt-get update \
25-
&& apt-get install -y --no-install-recommends git curl \
26-
&& apt-get clean \
27-
&& rm -rf /var/lib/apt/lists/*
21+
ARG UID=1000
22+
ARG GID=1000
23+
24+
ENV PYTHONUNBUFFERED=1 \
25+
PYTHONDONTWRITEBYTECODE=1
26+
27+
RUN set -eux; \
28+
apt-get update; \
29+
apt-get install -y --no-install-recommends git curl; \
30+
apt-get clean; \
31+
rm -rf /var/lib/apt/lists/*
2832

29-
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
3033
WORKDIR /app
31-
RUN useradd -m -u 1000 appuser
34+
RUN set -eux; \
35+
groupadd -g "$GID" appuser; \
36+
useradd -m -u "$UID" -g "$GID" appuser
3237

33-
# Copy Python site-packages and code
34-
COPY --from=python-builder /usr/local/lib/python3.13/site-packages/ \
35-
/usr/local/lib/python3.13/site-packages/
36-
COPY src/ ./
38+
COPY --from=python-builder --chown=$UID:$GID /usr/local/lib/python3.13/site-packages/ /usr/local/lib/python3.13/site-packages/
39+
COPY --chown=$UID:$GID src/ ./
3740

38-
# Set permissions
39-
RUN chown -R appuser:appuser /app
41+
RUN set -eux; \
42+
chown -R appuser:appuser /app
4043
USER appuser
4144

4245
EXPOSE 8000

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Gitingest
22

3-
[![Screenshot of Gitingest front page](https://raw.githubusercontent.com/cyclotruc/gitingest/refs/heads/main/docs/frontpage.png)](https://gitingest.com)
3+
[![Screenshot of Gitingest front page](https://raw.githubusercontent.com/coderamp-labs/gitingest/refs/heads/main/docs/frontpage.png)](https://gitingest.com)
44

55
<!-- Badges -->
66
<!-- markdownlint-disable MD033 -->
@@ -10,13 +10,13 @@
1010
<a href="https://pypi.org/project/gitingest"><img src="https://img.shields.io/pypi/pyversions/gitingest.svg" alt="Python Versions"></a>
1111
<br>
1212
<!-- row 2 — quality & community -->
13-
<a href="https://github.com/cyclotruc/gitingest/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://github.com/cyclotruc/gitingest/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
13+
<a href="https://github.com/coderamp-labs/gitingest/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://github.com/coderamp-labs/gitingest/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
1414
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff"></a>
15-
<a href="https://scorecard.dev/viewer/?uri=github.com/cyclotruc/gitingest"><img src="https://api.scorecard.dev/projects/github.com/cyclotruc/gitingest/badge" alt="OpenSSF Scorecard"></a>
15+
<a href="https://scorecard.dev/viewer/?uri=github.com/coderamp-labs/gitingest"><img src="https://api.scorecard.dev/projects/github.com/coderamp-labs/gitingest/badge" alt="OpenSSF Scorecard"></a>
1616
<br>
17-
<a href="https://github.com/cyclotruc/gitingest/blob/main/LICENSE"><img src="https://img.shields.io/github/license/cyclotruc/gitingest.svg" alt="License"></a>
17+
<a href="https://github.com/coderamp-labs/gitingest/blob/main/LICENSE"><img src="https://img.shields.io/github/license/coderamp-labs/gitingest.svg" alt="License"></a>
1818
<a href="https://pepy.tech/project/gitingest"><img src="https://pepy.tech/badge/gitingest" alt="Downloads"></a>
19-
<a href="https://github.com/cyclotruc/gitingest"><img src="https://img.shields.io/github/stars/cyclotruc/gitingest" alt="GitHub Stars"></a>
19+
<a href="https://github.com/coderamp-labs/gitingest"><img src="https://img.shields.io/github/stars/coderamp-labs/gitingest" alt="GitHub Stars"></a>
2020
<a href="https://discord.com/invite/zerRaGK9EC"><img src="https://img.shields.io/badge/Discord-Join_chat-5865F2?logo=discord&logoColor=white" alt="Discord"></a>
2121
<br>
2222
<a href="https://trendshift.io/repositories/13519"><img src="https://trendshift.io/api/badge/repositories/13519" alt="Trendshift" height="50"></a>
@@ -31,14 +31,14 @@ You can also replace `hub` with `ingest` in any GitHub URL to access the corresp
3131
[gitingest.com](https://gitingest.com) · [Chrome Extension](https://chromewebstore.google.com/detail/adfjahbijlkjfoicpjkhjicpjpjfaood) · [Firefox Add-on](https://addons.mozilla.org/firefox/addon/gitingest)
3232

3333
<!-- Languages -->
34-
[Deutsch](https://www.readme-i18n.com/cyclotruc/gitingest?lang=de) |
35-
[Español](https://www.readme-i18n.com/cyclotruc/gitingest?lang=es) |
36-
[Français](https://www.readme-i18n.com/cyclotruc/gitingest?lang=fr) |
37-
[日本語](https://www.readme-i18n.com/cyclotruc/gitingest?lang=ja) |
38-
[한국어](https://www.readme-i18n.com/cyclotruc/gitingest?lang=ko) |
39-
[Português](https://www.readme-i18n.com/cyclotruc/gitingest?lang=pt) |
40-
[Русский](https://www.readme-i18n.com/cyclotruc/gitingest?lang=ru) |
41-
[中文](https://www.readme-i18n.com/cyclotruc/gitingest?lang=zh)
34+
[Deutsch](https://www.readme-i18n.com/coderamp-labs/gitingest?lang=de) |
35+
[Español](https://www.readme-i18n.com/coderamp-labs/gitingest?lang=es) |
36+
[Français](https://www.readme-i18n.com/coderamp-labs/gitingest?lang=fr) |
37+
[日本語](https://www.readme-i18n.com/coderamp-labs/gitingest?lang=ja) |
38+
[한국어](https://www.readme-i18n.com/coderamp-labs/gitingest?lang=ko) |
39+
[Português](https://www.readme-i18n.com/coderamp-labs/gitingest?lang=pt) |
40+
[Русский](https://www.readme-i18n.com/coderamp-labs/gitingest?lang=ru) |
41+
[中文](https://www.readme-i18n.com/coderamp-labs/gitingest?lang=zh)
4242

4343
## 🚀 Features
4444

@@ -107,10 +107,10 @@ The `gitingest` command line tool allows you to analyze codebases and create a t
107107
gitingest /path/to/directory
108108

109109
# From URL
110-
gitingest https://github.com/cyclotruc/gitingest
110+
gitingest https://github.com/coderamp-labs/gitingest
111111

112112
# or from specific subdirectory
113-
gitingest https://github.com/cyclotruc/gitingest/tree/main/src/gitingest/utils
113+
gitingest https://github.com/coderamp-labs/gitingest/tree/main/src/gitingest/utils
114114
```
115115

116116
For private repositories, use the `--token/-t` option.
@@ -198,10 +198,10 @@ from gitingest import ingest
198198
summary, tree, content = ingest("path/to/directory")
199199

200200
# or from URL
201-
summary, tree, content = ingest("https://github.com/cyclotruc/gitingest")
201+
summary, tree, content = ingest("https://github.com/coderamp-labs/gitingest")
202202

203203
# or from a specific subdirectory
204-
summary, tree, content = ingest("https://github.com/cyclotruc/gitingest/tree/main/src/gitingest/utils")
204+
summary, tree, content = ingest("https://github.com/coderamp-labs/gitingest/tree/main/src/gitingest/utils")
205205
```
206206

207207
For private repositories, you can pass a token:
@@ -277,9 +277,9 @@ If you are hosting it on a domain, you can specify the allowed hostnames via env
277277

278278
### Non-technical ways to contribute
279279

280-
- **Create an Issue**: If you find a bug or have an idea for a new feature, please [create an issue](https://github.com/cyclotruc/gitingest/issues/new) on GitHub. This will help us track and prioritize your request.
280+
- **Create an Issue**: If you find a bug or have an idea for a new feature, please [create an issue](https://github.com/coderamp-labs/gitingest/issues/new) on GitHub. This will help us track and prioritize your request.
281281
- **Spread the Word**: If you like Gitingest, please share it with your friends, colleagues, and on social media. This will help us grow the community and make Gitingest even better.
282-
- **Use Gitingest**: The best feedback comes from real-world usage! If you encounter any issues or have ideas for improvement, please let us know by [creating an issue](https://github.com/cyclotruc/gitingest/issues/new) on GitHub or by reaching out to us on [Discord](https://discord.com/invite/zerRaGK9EC).
282+
- **Use Gitingest**: The best feedback comes from real-world usage! If you encounter any issues or have ideas for improvement, please let us know by [creating an issue](https://github.com/coderamp-labs/gitingest/issues/new) on GitHub or by reaching out to us on [Discord](https://discord.com/invite/zerRaGK9EC).
283283

284284
### Technical ways to contribute
285285

@@ -299,4 +299,4 @@ Check out the NPM alternative 📦 Repomix: <https://github.com/yamadashy/repomi
299299

300300
## 🚀 Project Growth
301301

302-
[![Star History Chart](https://api.star-history.com/svg?repos=cyclotruc/gitingest&type=Date)](https://star-history.com/#cyclotruc/gitingest&Date)
302+
[![Star History Chart](https://api.star-history.com/svg?repos=coderamp-labs/gitingest&type=Date)](https://star-history.com/#coderamp-labs/gitingest&Date)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ gitingest = "gitingest.__main__:main"
4949

5050
[project.urls]
5151
homepage = "https://gitingest.com"
52-
github = "https://github.com/cyclotruc/gitingest"
52+
github = "https://github.com/coderamp-labs/gitingest"
5353

5454
[build-system]
5555
requires = ["setuptools>=61.0", "wheel"]

0 commit comments

Comments
 (0)