git-markdown 0.1.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06b5aeed8786c57bb26b159375e7dcbb449e12b2ef4068f5aade847e1ffb809b
4
- data.tar.gz: 3c60e2b038a66ca27183e27c54efba8bc05a0cd0395f3c9ce6f735e401840702
3
+ metadata.gz: f0e1296f879c1e185897784daa05de2ee09283234544d6702b8c28d146d008d8
4
+ data.tar.gz: 980c114be2a7aa566c686e175505262b4f6b38e3215caa1de1e0c4dd05f3aaf9
5
5
  SHA512:
6
- metadata.gz: d5156133e179f31b2271f67caed36f9d90dfc0404cb25134097ae6a208861249959f6a3c4aefa7f1f7649d5f1ab25db11fb352de6bd2c11df8962139b2d2c327
7
- data.tar.gz: cbd01023d035fea4d1f82759e8d829d645ddbcbbf40fa8d5acaf5eff1a777861a9566d2c13dd078efe1abbe3995abd00b2d1e6ba8d9c3f2e364eebf5ae0aae2d
6
+ metadata.gz: c2a39643876719dc58ada4dbaee3ae0bf587f91e300516e16109c7c1710587de2a6fb9e52b0e806eb76fe04409c9260c409dd8e7761a7bd451e3ba5fbc23d50d
7
+ data.tar.gz: 26d2010bb34a48ab0ee6b1d59c065f53a7ba6a397923c83fe8d6566032c50279d79b51f3c5f2231c0c9a1cd17e8b535cdf1179b9f42407999013e92ad872c3b2
data/CHANGELOG.md CHANGED
@@ -5,9 +5,101 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.0] - 2026-11-04
9
+
10
+
11
+ ### Added
12
+
13
+ - harden git commits
14
+
15
+ - harden git commits ([#10](https://github.com/ethos-link/git-markdown/pull/10))
16
+
17
+ - require Ruby 4 and adopt Gemkit
18
+
19
+ - require Ruby 4 and adopt Gemkit ([#11](https://github.com/ethos-link/git-markdown/pull/11))
20
+
21
+
22
+
23
+
24
+ ### Documentation
25
+
26
+ - add conventional changelogs ([#8](https://github.com/ethos-link/git-markdown/pull/8))
27
+
28
+
29
+
30
+
31
+ ### Fixed
32
+
33
+ - preserve release changelog history ([#9](https://github.com/ethos-link/git-markdown/pull/9))
34
+
35
+ - standardrb offense
36
+
37
+
38
+
39
+ ## [0.1.9] - 2026-04-21
40
+
41
+ ### Fixed
42
+ - Publish the built gem directly from the release workflow.
43
+
44
+ ### Documentation
45
+ - Update the gemspec and README to match the current public positioning and release flow.
46
+
47
+ ### Changed
48
+ - Standardize the gem release workflow and repository conventions.
49
+ - Stop relying on GitHub variables in the release setup.
50
+
8
51
  ## [0.1.8] - 2026-03-20
9
52
 
10
- ### <!-- 0 -->šŸš€ Features
11
- - filter GitHub-native resolved comments via GraphQL
53
+ ### Added
54
+ - Filter GitHub-native resolved comments via GraphQL so exported review files stay focused on active feedback by default.
55
+
56
+ ## [0.1.7] - 2026-02-08
57
+
58
+ ### Fixed
59
+ - Read the CLI version from `GitMarkdown::VERSION` consistently.
60
+
61
+ ## [0.1.6] - 2026-02-08
62
+
63
+ ### Fixed
64
+ - Restore RubyGems publishing through the OIDC-compatible `rubygems/release-gem` workflow path.
65
+
66
+ ## [0.1.5] - 2026-02-08
67
+
68
+ ### Fixed
69
+ - Publish by building and pushing the gem artifact directly instead of relying on the previous release action flow.
70
+
71
+ ## [0.1.4] - 2026-02-08
72
+
73
+ ### Changed
74
+ - Stabilize the release line while iterating on the automated release process.
75
+
76
+ ## [0.1.3] - 2026-02-08
77
+
78
+ ### Fixed
79
+ - Add `workflow_call` support to `ruby.yml` and configure RubyGems authentication for the release workflow.
80
+ - Allow changelog generation to be optional in the release workflow when needed.
81
+
82
+ ### Changed
83
+ - Move to a single-command release process with changelog generation built into release preparation.
84
+
85
+ ## [0.1.1] - 2026-02-08
86
+
87
+ ### Added
88
+ - Add the `release:bump` task for automated version management.
89
+
90
+ ### Fixed
91
+ - Correct the gem bump flow and release version handling across the early automated release tasks.
92
+
93
+ ### Documentation
94
+ - Update the gemspec and changelog during the initial release hardening passes.
95
+
96
+ ## [0.1.0] - 2026-02-08
97
+
98
+ ### Added
99
+ - Bootstrap the `git-markdown` gem and its CLI for exporting pull requests into local Markdown files.
12
100
 
101
+ ### Fixed
102
+ - Harden setup and credential handling, including the initial `git-cliff` configuration and CLI UX cleanup.
13
103
 
104
+ ### Documentation
105
+ - Improve the README, metadata, and local development guidance for the first public release.
data/README.md CHANGED
@@ -110,64 +110,10 @@ Config is stored under `~/.config/git-markdown/`:
110
110
 
111
111
  ## Requirements
112
112
 
113
- - Ruby 3.0+
113
+ - Ruby 4.0+
114
114
  - Git (for remote detection)
115
115
  - GitHub Personal Access Token with `repo` scope
116
116
 
117
- ## Development
118
-
119
- ```bash
120
- git clone https://github.com/ethos-link/git-markdown.git
121
- cd git-markdown
122
-
123
- bundle install
124
- bundle exec rake test
125
- bundle exec standardrb
126
- bundle exec rake
127
- ```
128
-
129
- Note: `Gemfile.lock` is intentionally not tracked to avoid conflicts across Ruby versions.
130
-
131
- ### Git hooks
132
-
133
- We use [lefthook](https://lefthook.dev/) with the Ruby [commitlint](https://github.com/arandilopez/commitlint) gem to enforce Conventional Commits on every commit. CI also validates commit messages on pull requests and pushes to main/master.
134
-
135
- Run the hook installer once per clone:
136
-
137
- ```bash
138
- bundle exec lefthook install
139
- ```
140
-
141
- ### Install locally
142
-
143
- ```bash
144
- rake install
145
- ```
146
-
147
- ## Release
148
-
149
- Releases are triggered by pushed tags and use `CHANGELOG.md` for GitHub release notes.
150
-
151
- If you want changelog automation, install `git-cliff` (<https://github.com/orhun/git-cliff>) locally and use it to update `CHANGELOG.md`.
152
-
153
- The release workflow expects a `## [X.Y.Z]` entry in `CHANGELOG.md` that matches the tag. Note: `release:prep` enforces a clean working tree and must run on the `main` or `master` branch; it will skip if the changelog has no changes.
154
-
155
- Before bumping, install dependencies:
156
-
157
- ```bash
158
- bundle install
159
- ```
160
-
161
- Then run:
162
-
163
- ```bash
164
- # 1) Bump the version (commit created)
165
- bundle exec gem bump -v X.Y.Z
166
-
167
- # 2) Prepare release (changelog + tag + push)
168
- bundle exec rake release:prep
169
- ```
170
-
171
117
  ## Contributing
172
118
 
173
119
  1. Fork it
@@ -197,9 +143,31 @@ Please use [Conventional Commits](https://www.conventionalcommits.org/) for comm
197
143
 
198
144
  MIT License, see [LICENSE.txt](LICENSE.txt)
199
145
 
200
- ## About
146
+ ## Development and releases
147
+
148
+ Shared tooling uses published [Ethos Gemkit](https://github.com/ethos-link/ethos-gemkit).
149
+ Keep the exact Gemfile version and workflow commit pins on the same release.
150
+
151
+ ```sh
152
+ bundle install
153
+ bundle exec lefthook install
154
+ bundle exec rake verify
155
+ ```
156
+
157
+ From clean, current `main`, run `bundle exec rake 'release:prepare[patch]'`
158
+ (or `minor`, `major`, or an explicit version). Review and merge the generated
159
+ release PR to publish through Actions. Shared prerequisites, registry credentials
160
+ and failed-job recovery are in the [Gemkit release guide](https://github.com/ethos-link/ethos-gemkit#releasing-a-gem).
161
+
162
+ ## Built by Ethos Link
201
163
 
202
- Made by the team at [Ethos Link](https://www.ethos-link.com) — practical software for growing businesses. We build tools for hospitality and retail teams who don’t have time for complicated setups: plain-language insights, fast onboarding, and real human support so you can get clear insights, take action, and move on.
164
+ [Ethos Link](https://www.ethos-link.com) builds business software and integrations
165
+ that replace manual handoffs with connected workflows. We help teams automate
166
+ routine work, use their data and improve the processes their business runs on.
203
167
 
204
- We also build [Reviato](https://www.reviato.com), ā€œMore stars. Less hassle.ā€.
205
- Reviato helps restaurants, hotels, clinics, vets and other local businesses collect and analyse customer reviews, highlights recurring themes, and turns feedback into actionable next steps.
168
+ - [Reviato](https://www.reviato.com): Read public review trends and collect
169
+ private customer feedback, so your team can decide what to improve.
170
+ - [EthosPlaces](https://www.ethos.place): Give customers the details they need to
171
+ choose and visit your business, from opening hours to directions.
172
+ - [Nuntio](https://www.nuntiohq.com): Draft, review and schedule social posts in
173
+ one workspace, then track each publishing result.
data/UPGRADE.md ADDED
@@ -0,0 +1,11 @@
1
+ # Upgrade Guide
2
+
3
+ ## 0.2.0
4
+
5
+ ### Shared development and release tooling
6
+
7
+ Use Ruby 4 and published Gemkit 0.2.0. Install the bundle and hooks, then run the
8
+ project's verification command from the README. Prepare releases from clean,
9
+ current main; merging the generated release PR publishes through Actions.
10
+ See the [Gemkit upgrade guide](https://github.com/ethos-link/ethos-gemkit/blob/main/UPGRADE.md)
11
+ for workflow permissions and registry setup.
@@ -33,9 +33,9 @@ module GitMarkdown
33
33
  review.comments = all_pr_comments
34
34
  .select { |c| c["pull_request_review_id"] == review.id }
35
35
  .map do |data|
36
- comment = Models::Comment.from_api(data)
37
- comment.resolved = resolved_ids.include?(comment.id)
38
- comment
36
+ comment = Models::Comment.from_api(data)
37
+ comment.resolved = resolved_ids.include?(comment.id)
38
+ comment
39
39
  end
40
40
  review
41
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitMarkdown
4
- VERSION = "0.1.8"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Fidalgo
@@ -38,34 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '6.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '13.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '13.0'
55
- - !ruby/object:Gem::Dependency
56
- name: standard
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.0'
69
41
  - !ruby/object:Gem::Dependency
70
42
  name: vcr
71
43
  requirement: !ruby/object:Gem::Requirement
@@ -96,21 +68,18 @@ dependencies:
96
68
  version: '3.0'
97
69
  description: A CLI tool that fetches GitHub pull requests and converts them to Markdown
98
70
  format, perfect for local AI assistants like opencode and codex.
71
+ email:
72
+ - devel@ethos-link.com
99
73
  executables:
100
74
  - git-markdown
101
75
  extensions: []
102
76
  extra_rdoc_files: []
103
77
  files:
104
- - AGENTS.md
105
78
  - CHANGELOG.md
106
- - Gemfile
107
79
  - LICENSE.txt
108
80
  - README.md
109
- - Rakefile
81
+ - UPGRADE.md
110
82
  - bin/git-markdown
111
- - cliff.toml
112
- - git-markdown.gemspec
113
- - lefthook.yml
114
83
  - lib/git/markdown/api/client.rb
115
84
  - lib/git/markdown/api/response.rb
116
85
  - lib/git/markdown/cli.rb
@@ -134,9 +103,11 @@ metadata:
134
103
  homepage_uri: https://www.ethos-link.com/opensource/git-markdown
135
104
  source_code_uri: https://github.com/ethos-link/git-markdown
136
105
  bug_tracker_uri: https://github.com/ethos-link/git-markdown/issues
137
- changelog_uri: https://github.com/ethos-link/git-markdown/blob/master/CHANGELOG.md
138
- documentation_uri: https://github.com/ethos-link/git-markdown/blob/master/README.md
106
+ changelog_uri: https://github.com/ethos-link/git-markdown/blob/main/CHANGELOG.md
107
+ documentation_uri: https://github.com/ethos-link/git-markdown/blob/main/README.md
139
108
  funding_uri: https://www.reviato.com/
109
+ github_repo: ssh://github.com/ethos-link/git-markdown
110
+ allowed_push_host: https://rubygems.org
140
111
  rubygems_mfa_required: 'true'
141
112
  rdoc_options: []
142
113
  require_paths:
@@ -145,14 +116,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
116
  requirements:
146
117
  - - ">="
147
118
  - !ruby/object:Gem::Version
148
- version: 3.0.0
119
+ version: '4.0'
149
120
  required_rubygems_version: !ruby/object:Gem::Requirement
150
121
  requirements:
151
122
  - - ">="
152
123
  - !ruby/object:Gem::Version
153
124
  version: '0'
154
125
  requirements: []
155
- rubygems_version: 4.0.6
126
+ rubygems_version: 4.0.20
156
127
  specification_version: 4
157
128
  summary: Convert GitHub PRs to Markdown for local AI code review
158
129
  test_files: []
data/AGENTS.md DELETED
@@ -1,248 +0,0 @@
1
- # AI Agent Playbook
2
-
3
- Rules any code-generation agent must follow when editing this repository.
4
- Keep changes minimal, validated, and consistent with existing patterns.
5
-
6
- ## How to work in this repo
7
-
8
- - Prefer surgical edits. Don’t reformat unrelated code. Preserve public APIs unless required.
9
- - Source of truth is the code: read actual files, signatures, and call sites before changing anything.
10
- - Think before acting: understand root causes; don’t treat symptoms.
11
-
12
- ### Stack constraints (do not drift)
13
-
14
- - Ruby 3.4 + Rails 8.1
15
- - No-build frontend: Importmap + tailwindcss-rails (Tailwind v4)
16
- - Use `bin/dev` for local dev (Rails + Tailwind watcher + GoodJob)
17
- - Do not introduce Node/Yarn or JS bundlers
18
-
19
- ### Commands (run before finishing)
20
-
21
- - Tests: `bundle exec rails test` (all) or targeted files
22
- - System tests: `bundle exec rails test:system`
23
- - Coverage: `COVERAGE=1 bundle exec rails test`
24
- - Lint: `bin/rubocop`
25
- - ERB lint: `bundle exec erb_lint --lint-all`
26
- - Assets: `RAILS_ENV=production bin/rails assets:precompile`
27
- - Data: `bin/rails data:plans:seed`
28
-
29
- ## Boundaries
30
-
31
- ### Always
32
-
33
- - Keep diffs surgical; don’t shuffle files or reformat unrelated code.
34
- - Add/update minimal tests when behavior changes.
35
- - Use i18n keys for user-facing copy (no hardcoded UI strings).
36
- - Keep WebMock enabled in tests; do not allow live HTTP.
37
-
38
- ### Ask first (high-risk)
39
-
40
- - New dependencies (gems / JS packages / tooling).
41
- - Database migrations or schema changes.
42
- - Changes to provider contracts, auth/authorization, billing, or security boundaries.
43
- - Editing Rails credentials / secrets handling.
44
-
45
- ### Never
46
-
47
- - Commit secrets/credentials, master keys, or decrypted values.
48
- - Add Node/Yarn/bundlers to the stack.
49
- - Add debug prints/breakpoints in app/runtime code (`puts`, `pp`, `binding.pry`).
50
- - Exception: intentional CLI output in Rake tasks is acceptable.
51
-
52
- ## Git commits
53
-
54
- - Use Conventional Commits.
55
- - Subject line ≤ 80 chars, imperative, no trailing period.
56
- - Body (when non-trivial): explain **why** and **how** (not what).
57
- - Types: `feat`, `fix`, `refactor`, `chore`, `test`, `docs`.
58
-
59
- ## Project map (what goes where)
60
-
61
- - `app/`: Rails MVC, jobs, services (legacy), views.
62
- - `lib/`: External providers and infra (`lib/providers`, `lib/faraday`, `lib/rack`).
63
- - Data in `lib/data/` (e.g., `plans.yml`). Rake tasks in `lib/tasks/`.
64
- - `lib/providers`: Provider interfaces/results + implementations. Use `Providers::Page`/`Providers::Review` at boundaries.
65
- - Webhook resources via `Providers::Resources` (`:page`, `:review`).
66
- - `test/`: Minitest (`integration/`, `system/`, etc.)
67
- - VCR cassettes: `test/support/cassettes/`
68
- - Webhook captures: `test/support/webhook_captures/`
69
- - Controllers: root under `app/controllers/`; namespaced in matching folders.
70
- - Base classes: `PublicBaseController`, `DashboardBaseController`, `Admin::BaseController`.
71
-
72
- ## Decision trees (use these defaults)
73
-
74
- ### 1) You’re touching an Actor/service object
75
-
76
- - Is the change trivial (typo, small conditional, tiny refactor)?
77
- - Yes → keep the existing Actor/service shape.
78
- - No → convert the touched service to a PORO as part of the change.
79
- - When converting:
80
- - Prefer explicit constructors + methods (`ThingCreator.new(...).create`)
81
- - Or move behavior onto the relevant model when it naturally belongs there.
82
-
83
- ### 2) You’re touching a ViewComponent / adding shared UI
84
-
85
- - Are you adding new UI/shared UI?
86
- - Yes → use Rails partials under `app/views/shared/` (layout-aware; see below).
87
- - Are you touching an existing ViewComponent?
88
- - Small change → keep it as-is.
89
- - Meaningful change → prefer migrating it to a partial as part of the change.
90
-
91
- ## Rails conventions
92
-
93
- - Routing: keep routes simple and close to Rails defaults.
94
- - Avoid redundant `defaults:` / `controller:` overrides when convention can solve it.
95
- - Avoid `:as` overrides unless strictly necessary.
96
- - Prefer `namespace` + `resources`.
97
- - Prefer REST/CRUD: introduce a resource instead of custom actions.
98
-
99
- ## Code style (scoped, Fizzy-inspired)
100
-
101
- Directional rules. Apply them to **new code** and **methods/files you already touch**.
102
- Do not do churn-only refactors solely to ā€œmatch styleā€.
103
-
104
- - Prefer expanded conditionals over guard clauses.
105
- - Exception: early return at the very start of a method when the main body is non-trivial.
106
- - Method ordering in classes:
107
- 1) class methods
108
- 2) public methods (with `initialize` first)
109
- 3) private methods
110
- - Order methods vertically by invocation order (top-down flow).
111
- - Only use `!` when there is a corresponding non-`!` method.
112
- - No blank line after visibility modifiers; indent methods under them.
113
- - Thin controllers invoking rich domain APIs; avoid introducing ā€œservice artifactsā€ as glue.
114
- - Jobs should be shallow: enqueue via `*_later`, execute logic in `*_now` / domain methods.
115
-
116
- ## Fail fast (avoid defensive programming)
117
-
118
- We prefer code to break loudly when something unexpected happens.
119
-
120
- - Avoid ā€œdefensiveā€ checks that mask errors:
121
- - `respond_to?`, `try`, dynamic `send` to avoid using the real API
122
- - broad `rescue` that swallows exceptions
123
- - returning nil/false as a fallback for unexpected states
124
- - Prefer explicit contracts:
125
- - `find_by!` instead of `find_by` when it must exist
126
- - `Hash#fetch` when a key must exist
127
- - Rescue only specific exceptions you truly handle, and keep handling intentional.
128
-
129
- ## Architecture direction
130
-
131
- ### Services (Actor gem) → POROs
132
-
133
- - Current state: there are service objects using the Actor gem.
134
- - Direction: migrate toward POROs inline with Rails/DHH style.
135
- - Do not add new Actor-based services.
136
- - Use the decision tree above to decide when to migrate.
137
-
138
- ### Views: ViewComponents → Partials
139
-
140
- - Do not add new ViewComponents.
141
- - Prefer Rails partials under `app/views/shared/`.
142
- - Because we have 3 layouts (`public`, `application`, `admin`), prefer layout-aware shared folders:
143
- - `app/views/shared/public/…`
144
- - `app/views/shared/application/…`
145
- - `app/views/shared/admin/…`
146
- - Pass data via `locals`; avoid relying on instance vars in shared partials.
147
-
148
- ## Coding standards & optimization
149
-
150
- - Less is more: prefer less code without sacrificing readability.
151
- - Use clear, intention-revealing names; avoid vague names like `Manager`, `Handler`.
152
- - Performance:
153
- - Avoid N+1 (`includes`, `preload`).
154
- - Use DB constraints/indexes for new query patterns.
155
- - Batch processing for large datasets (`find_each`, `insert_all`).
156
- - Dependencies:
157
- - Do not add new dependencies for trivial tasks.
158
- - Prefer stdlib / Rails built-ins already in the stack.
159
-
160
- ## UI & Frontend
161
-
162
- - Tailwind v4 tokens live in `app/assets/tailwind/application.css`; use theme variables and brand classes.
163
- - Forms baseline: ā€œLabels on leftā€ layout.
164
- - Stimulus-first:
165
- - Prefer controllers from `tailwindcss-stimulus-components` and `@stimulus-components/*`.
166
- - New controllers must be generic, reusable, under `app/javascript/controllers/`, and registered in `controllers/index.js`.
167
- - Copy must follow `docs/brand.md`. Marketing pages must follow `docs/marketing/style-guide.md`.
168
- - No inline styles (`style="..."`). Use Tailwind utilities.
169
- - Prefer semantic HTML and accessibility basics (labels, autocomplete where appropriate).
170
-
171
- ## Mailers
172
-
173
- - Mailer views live under `app/views/mailers/`.
174
- - Shared layout: `app/views/layouts/mailer.html.erb`
175
- - Prefer partials under `app/views/mailers/` for shared sections.
176
- - Use `premailer-rails` to inline styles.
177
- - Set `deliver_later_queue_name` to `:latency_5m` in mailers.
178
-
179
- ## Testing (must follow)
180
-
181
- ### What tests should do
182
-
183
- - Tests must cover application behavior, not framework behavior.
184
- - Tests must validate observable outcomes (rendered content, redirects, DB changes, enqueued jobs, outbound payloads).
185
- - Avoid:
186
- - tautological tests (re-implementing method logic in the test)
187
- - ā€œRails worksā€ tests
188
- - status-only assertions with no behavioral check
189
- - heavy stubbing that can’t catch regressions
190
-
191
- ### Practical rules
192
-
193
- - Framework: Minitest. Fixtures only (factories have been removed). Do not add factories.
194
- - Anatomy: setup (optional); exercise; assertions; cleanup (optional). Leave an empty line between sections.
195
- - Controller/system tests must assert status/redirect AND content (selectors/text) or side effects.
196
- - System tests: use `data-test-id` selectors; add `data-test-id` attributes in views when needed.
197
- - Keep review pages small in tests (~10) for speed and deterministic assertions.
198
-
199
- ### HTTP / VCR / webhooks
200
-
201
- - WebMock enabled.
202
- - Outgoing API calls: recorded with VCR (see Project map for cassette location).
203
- - VCR structure mirrors provider/API path segments.
204
- - Filename: `{platform}_{resource}[optional_suffix].yml`.
205
- - Incoming webhooks: do not VCR. Use JSON captures (see Project map).
206
-
207
- Canonical pattern (webhook fixture ingestion):
208
-
209
- ```ruby
210
- test "DataForSEO resolve with async mode" do
211
- VCR.use_cassette("dataforseo/serp_google_maps_task_post/google_maps_page_resolve") do
212
- result = Providers::Dataforseo::GoogleMaps::Page.new(
213
- mode: :async,
214
- recording: VCR.current_cassette.recording?,
215
- platform: :google_maps
216
- ).submit(
217
- place_eid: @page.place_eid,
218
- business_name: @location.name,
219
- country: "GB"
220
- )
221
-
222
- assert_equal :scheduled, result.status
223
-
224
- ExternalTask.create!(
225
- record_uuid: @page.uuid,
226
- record_type: @page.class.name,
227
- provider: Providers::External::DATAFORSEO,
228
- resource: Providers::Resources::PAGE,
229
- eid: result.eid
230
- )
231
-
232
- payload = WebhookCapture.read(
233
- provider: Providers::External::DATAFORSEO,
234
- platform: :google_maps,
235
- resource: Providers::Resources::PAGE,
236
- task_eid: result.eid
237
- )
238
- assert_not_nil payload
239
-
240
- response = Providers::Dataforseo::GoogleMaps::Page.new(
241
- mode: :async,
242
- platform: :google_maps
243
- ).ingest(payload)
244
-
245
- assert_equal :ok, response.status
246
- assert_equal "ChIJrVtdwkDzdkgRHgNW25ELRtQ", response.data.place_eid
247
- end
248
- end
data/Gemfile DELETED
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in git-markdown.gemspec
6
- gemspec
7
-
8
- gem "gem-release", "~> 2.2"
9
-
10
- group :development do
11
- gem "commitlint", require: false
12
- gem "lefthook", require: false
13
- end
data/Rakefile DELETED
@@ -1,89 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Note: Releases are handled automatically by GitHub Actions when you push a tag (e.g., v0.2.0)
4
- # See .github/workflows/release.yml for details
5
- require "bundler/gem_tasks"
6
- require "rake/testtask"
7
- require "standard/rake"
8
- require_relative "lib/git/markdown/version"
9
-
10
- Rake::TestTask.new(:test) do |t|
11
- t.libs << "test"
12
- t.libs << "lib"
13
- t.test_files = FileList["test/**/*_test.rb"]
14
- end
15
-
16
- task default: %i[test standard]
17
-
18
- namespace :release do
19
- desc "Full release: update changelog, bump version, commit, tag, and push"
20
- task :bump, [:level] do |_t, args|
21
- level = args[:level] || "patch"
22
- valid_levels = %w[major minor patch pre]
23
-
24
- unless valid_levels.include?(level)
25
- abort "Invalid level: #{level}. Use: #{valid_levels.join(", ")}"
26
- end
27
-
28
- branch = `git rev-parse --abbrev-ref HEAD`.strip
29
- unless ["main", "master"].include?(branch)
30
- abort "Release must run on main or master. Current: #{branch}."
31
- end
32
-
33
- unless system("git diff --quiet") && system("git diff --cached --quiet")
34
- abort "Release requires a clean working tree."
35
- end
36
-
37
- current = GitMarkdown::VERSION
38
- parts = current.split(".").map(&:to_i)
39
-
40
- next_version = case level
41
- when "major"
42
- "#{parts[0] + 1}.0.0"
43
- when "minor"
44
- "#{parts[0]}.#{parts[1] + 1}.0"
45
- when "patch"
46
- "#{parts[0]}.#{parts[1]}.#{parts[2] + 1}"
47
- when "pre"
48
- "#{parts[0]}.#{parts[1]}.#{parts[2]}.pre.1"
49
- end
50
-
51
- puts "=== Step 1: Updating CHANGELOG.md for v#{next_version} ==="
52
- sh "git cliff -c cliff.toml --unreleased --tag v#{next_version} -o CHANGELOG.md"
53
-
54
- if system("git diff --quiet -- CHANGELOG.md")
55
- puts "Warning: No changelog changes detected"
56
- else
57
- puts "āœ“ Changelog updated"
58
- end
59
-
60
- puts "\n=== Step 2: Bumping version to #{next_version} ==="
61
-
62
- File.write(
63
- "lib/git/markdown/version.rb",
64
- <<~RUBY
65
- # frozen_string_literal: true
66
-
67
- module GitMarkdown
68
- VERSION = "#{next_version}"
69
- end
70
- RUBY
71
- )
72
-
73
- puts "āœ“ Version updated in lib/git/markdown/version.rb"
74
-
75
- puts "\n=== Step 3: Committing changes ==="
76
- sh "git add CHANGELOG.md lib/git/markdown/version.rb"
77
- sh "git commit -m \"chore(release): bump version to #{next_version}\""
78
- puts "āœ“ Changes committed"
79
-
80
- puts "\n=== Step 4: Creating and pushing tag ==="
81
- sh "git tag -a v#{next_version} -m \"Release v#{next_version}\""
82
- sh "git push origin master"
83
- sh "git push origin v#{next_version}"
84
- puts "āœ“ Tag v#{next_version} created and pushed"
85
-
86
- puts "\nāœ… Release v#{next_version} prepared successfully!"
87
- puts "GitHub Actions will now build and publish the release."
88
- end
89
- end
data/cliff.toml DELETED
@@ -1,53 +0,0 @@
1
- [changelog]
2
- header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n"
3
- body = "{% if version %}## [{{ version | trim_start_matches(pat=\"v\") }}] - {{ timestamp | date(format=\"%Y-%m-%d\") }}\n{% endif %}\n{% for group, commits in commits | group_by(attribute=\"group\") %}{% if commits | length > 0 %}### {{ group }}\n{% for commit in commits %}- {{ commit.message | trim }}\n{% endfor %}\n\n{% endif %}{% endfor %}"
4
- trim = true
5
-
6
- [git]
7
- conventional_commits = true
8
- filter_unconventional = true
9
- tag_pattern = "v[0-9]*"
10
-
11
- [[commit_parsers]]
12
- message = '^feat(\(.*\))?:'
13
- group = "Added"
14
-
15
- [[commit_parsers]]
16
- message = '^fix(\(.*\))?:'
17
- group = "Fixed"
18
-
19
- [[commit_parsers]]
20
- message = '^docs(\(.*\))?:'
21
- group = "Documentation"
22
-
23
- [[commit_parsers]]
24
- message = '^refactor(\(.*\))?:'
25
- group = "Changed"
26
-
27
- [[commit_parsers]]
28
- message = '^perf(\(.*\))?:'
29
- group = "Changed"
30
-
31
- [[commit_parsers]]
32
- message = '^test(\(.*\))?:'
33
- group = "Changed"
34
-
35
- [[commit_parsers]]
36
- message = '^chore(\(.*\))?:'
37
- group = "Changed"
38
-
39
- [[commit_parsers]]
40
- message = '^build(\(.*\))?:'
41
- group = "Changed"
42
-
43
- [[commit_parsers]]
44
- message = '^ci(\(.*\))?:'
45
- group = "Changed"
46
-
47
- [[commit_parsers]]
48
- message = '^style(\(.*\))?:'
49
- group = "Changed"
50
-
51
- [[commit_parsers]]
52
- message = '^revert(\(.*\))?:'
53
- group = "Changed"
data/git-markdown.gemspec DELETED
@@ -1,45 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/git/markdown/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "git-markdown"
7
- spec.version = GitMarkdown::VERSION
8
- spec.authors = ["Paulo Fidalgo", "Ethos Link"]
9
-
10
- spec.summary = "Convert GitHub PRs to Markdown for local AI code review"
11
- spec.description = "A CLI tool that fetches GitHub pull requests and converts them to Markdown format, perfect for local AI assistants like opencode and codex."
12
- spec.homepage = "https://www.ethos-link.com/opensource/git-markdown"
13
- spec.license = "MIT"
14
- spec.required_ruby_version = ">= 3.0.0"
15
-
16
- repo = "https://github.com/ethos-link/git-markdown"
17
- branch = "master"
18
-
19
- spec.metadata = {
20
- "homepage_uri" => spec.homepage,
21
- "source_code_uri" => repo,
22
- "bug_tracker_uri" => "#{repo}/issues",
23
- "changelog_uri" => "#{repo}/blob/#{branch}/CHANGELOG.md",
24
- "documentation_uri" => "#{repo}/blob/#{branch}/README.md",
25
- "funding_uri" => "https://www.reviato.com/",
26
- "rubygems_mfa_required" => "true"
27
- }
28
-
29
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
30
- `git ls-files -z`.split("\x0").reject do |f|
31
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
32
- end
33
- end
34
- spec.bindir = "bin"
35
- spec.executables = ["git-markdown"]
36
- spec.require_paths = ["lib"]
37
-
38
- spec.add_dependency "thor", "~> 1.0"
39
-
40
- spec.add_development_dependency "minitest", "~> 6.0"
41
- spec.add_development_dependency "rake", "~> 13.0"
42
- spec.add_development_dependency "standard", "~> 1.0"
43
- spec.add_development_dependency "vcr", "~> 6.0"
44
- spec.add_development_dependency "webmock", "~> 3.0"
45
- end
data/lefthook.yml DELETED
@@ -1,6 +0,0 @@
1
- commit-msg:
2
- jobs:
3
- - name: commitlint
4
- run: bundle exec commitlint --message {1}
5
- - name: standard
6
- run: bundle exec rake standard