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
15 changes: 15 additions & 0 deletions .github/.gitmessage
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# <type>: <short summary> (max 50 chars)
#
# Types:
# Add — New content, files, examples
# Fix — Bug fix or correction
# Refactor — Code restructure (no new functionality)
# Document — README, comments, guides
# Update — Modify existing content
# Remove — Delete files or code
# Style — Formatting, whitespace, naming
#
# Body (optional): explain WHY, not WHAT (wrap at 72 chars)
#
# Footer (optional): reference issues — e.g. Closes #12

59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Bug Report
description: Report code that doesn't compile or behaves incorrectly.
title: "[Bug] "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting! Please fill out the sections below.

- type: input
id: file
attributes:
label: File / Example
description: Which file or example is affected?
placeholder: e.g. fundamentals/functions/methodes.h
validations:
required: true

- type: textarea
id: description
attributes:
label: What happened?
description: Describe the bug — expected vs. actual behavior.
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Steps to reproduce
description: How can the bug be triggered?
value: |
1. Compile with `g++ ...`
2. Run `./program`
3. See error ...
validations:
required: false

- type: dropdown
id: compiler
attributes:
label: Compiler
options:
- g++ (MinGW / Linux)
- MSVC (Visual Studio)
- clang++
- Other
validations:
required: false

- type: textarea
id: logs
attributes:
label: Error output / logs
description: Paste any compiler errors or runtime output.
render: shell
validations:
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Roadmap
url: https://github.com/PtiCalin/cpp/blob/main/ROADMAP.md
about: Check the learning roadmap before opening an issue.
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/new-content.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: New Content
description: Suggest a new example, topic, or project to add.
title: "[Content] "
labels: ["enhancement", "content"]
body:
- type: markdown
attributes:
value: |
Suggest something to add to the learning repository.

- type: dropdown
id: phase
attributes:
label: Roadmap Phase
description: Which phase does this relate to?
options:
- "Phase 1 — Foundations"
- "Phase 2 — Modular Programming"
- "Phase 3 — OOP"
- "Phase 4 — File I/O"
- "Phase 5 — Console Projects"
- "Phase 6 — Next Steps"
- "Not sure"
validations:
required: true

- type: textarea
id: description
attributes:
label: Description
description: What should be added and why?
validations:
required: true

- type: textarea
id: references
attributes:
label: References / Resources
description: Any links, articles, or examples that could help?
validations:
required: false
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Question / Learning Note
description: Ask a question or log something you want to revisit.
title: "[Question] "
labels: ["question"]
body:
- type: markdown
attributes:
value: |
Use this to log a C++ question or concept you want to explore further.

- type: input
id: topic
attributes:
label: Topic
placeholder: e.g. virtual destructors, template specialization
validations:
required: true

- type: textarea
id: question
attributes:
label: Question / Note
description: What are you trying to understand?
validations:
required: true

- type: textarea
id: context
attributes:
label: Context
description: Any code, links, or details that provide context.
validations:
required: false
60 changes: 60 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Repository labels — synced by .github/workflows/label-sync.yml

# Type
- name: bug
color: "d73a4a"
description: Something isn't working.

- name: enhancement
color: "a2eeef"
description: New feature or improvement.

- name: content
color: "0075ca"
description: New example, topic, or project.

- name: question
color: "d876e3"
description: Question or concept to revisit.

- name: documentation
color: "0e8a16"
description: README, guide, or comment update.

# Status
- name: stale
color: "ededed"
description: Inactive — will be closed soon.

- name: pinned
color: "006b75"
description: Exempt from stale bot.

- name: good first issue
color: "7057ff"
description: Good for newcomers.

# Phase (maps to ROADMAP)
- name: "phase:1-foundations"
color: "fbca04"
description: "Phase 1 — Foundations"

- name: "phase:2-modular"
color: "fbca04"
description: "Phase 2 — Modular Programming"

- name: "phase:3-oop"
color: "fbca04"
description: "Phase 3 — OOP"

- name: "phase:4-file-io"
color: "fbca04"
description: "Phase 4 — File I/O"

- name: "phase:5-projects"
color: "fbca04"
description: "Phase 5 — Console Projects"

- name: "phase:6-next"
color: "fbca04"
description: "Phase 6 — Next Steps"
42 changes: 42 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Release Drafter config — categorises merged PRs into release notes.

name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"

categories:
- title: "New Content"
labels:
- content
- enhancement
- title: "Bug Fixes"
labels:
- bug
- title: "Documentation"
labels:
- documentation
- title: "Maintenance"
labels:
- stale

change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
no-changes-template: "No changes since the last release."

version-resolver:
major:
labels: []
minor:
labels:
- enhancement
- content
patch:
labels:
- bug
- documentation
default: patch

template: |
## What's Changed

$CHANGES

**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# CI — Compile check for C++ files
# Runs on every push and PR to main.

name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install g++
run: sudo apt-get update && sudo apt-get install -y g++

- name: Compile standalone examples
run: |
echo "=== Compiling standalone .cpp files ==="
exit_code=0
for file in $(find . -name '*.cpp' -not -path './.github/*'); do
echo "--- $file ---"
g++ -std=c++17 -Wall -Wextra -fsyntax-only "$file" 2>&1 || exit_code=1
done
exit $exit_code
25 changes: 25 additions & 0 deletions .github/workflows/label-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Label Sync — keep labels consistent via config file.
# Run manually or on push to .github/labels.yml.

name: Sync Labels

on:
push:
branches: [main]
paths: [.github/labels.yml]
workflow_dispatch:

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Sync labels
uses: EndBug/label-sync@v2
with:
config-file: .github/labels.yml
delete-other-labels: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Release Drafter — auto-generates draft release notes from merged PRs.

name: Release Drafter

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pull-requests: read

jobs:
draft:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Stale — close inactive issues and PRs after a grace period.

name: Stale

on:
schedule:
- cron: "0 8 * * 1" # every Monday at 08:00 UTC

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: >
This issue has been inactive for 30 days and will be closed in 7 days
unless there is new activity.
stale-pr-message: >
This PR has been inactive for 30 days and will be closed in 7 days
unless there is new activity.
days-before-stale: 30
days-before-close: 7
stale-issue-label: stale
stale-pr-label: stale
exempt-issue-labels: pinned
Loading
Loading