shiplog 0.1.1 → 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 +4 -4
- data/CHANGELOG.md +38 -0
- data/README.md +126 -4
- data/app/controllers/shiplog/admin/syncs_controller.rb +3 -2
- data/app/controllers/shiplog/changelogs_controller.rb +11 -1
- data/app/controllers/shiplog/public_controller.rb +3 -1
- data/app/controllers/shiplog/roadmaps_controller.rb +25 -2
- data/app/frontend/shiplog/shiplog.css +121 -6
- data/app/helpers/shiplog/callable_helper.rb +12 -0
- data/app/helpers/shiplog/frontend_helper.rb +1 -0
- data/app/helpers/shiplog/roadmap_helper.rb +15 -0
- data/app/helpers/shiplog/switcher_helper.rb +101 -0
- data/app/jobs/shiplog/refresh_job.rb +1 -0
- data/app/jobs/shiplog/scan_changes_job.rb +19 -5
- data/app/jobs/shiplog/sync_job.rb +1 -1
- data/app/models/shiplog/change_candidates.rb +39 -4
- data/app/models/shiplog/entry.rb +17 -0
- data/app/models/shiplog/pull_request.rb +4 -0
- data/app/models/shiplog/pull_request_upgrade.rb +5 -0
- data/app/models/shiplog/rewriter/prompt.rb +27 -3
- data/app/models/shiplog/rewriter.rb +20 -1
- data/app/models/shiplog/sync/pull_request_importer.rb +23 -1
- data/app/models/shiplog/sync/repository_sync.rb +2 -0
- data/app/models/shiplog/sync/upgrade_detector.rb +203 -0
- data/app/views/layouts/shiplog/application.html.erb +1 -0
- data/app/views/shiplog/_page_header.html.erb +2 -1
- data/app/views/shiplog/_switcher.html.erb +13 -0
- data/app/views/shiplog/admin/entries/_entry_row.html.erb +1 -0
- data/app/views/shiplog/changelogs/_search.html.erb +16 -0
- data/app/views/shiplog/changelogs/show.html.erb +11 -3
- data/app/views/shiplog/roadmaps/_card.html.erb +12 -1
- data/app/views/shiplog/roadmaps/_column.html.erb +2 -2
- data/app/views/shiplog/roadmaps/_shipped.html.erb +15 -0
- data/app/views/shiplog/roadmaps/show.html.erb +9 -0
- data/config/locales/en.yml +20 -0
- data/db/migrate/20261027000001_create_shiplog_pull_request_upgrades.rb +30 -0
- data/lib/generators/shiplog/install/install_generator.rb +20 -1
- data/lib/generators/shiplog/install/templates/initializer.rb.tt +37 -0
- data/lib/shiplog/classes.rb +20 -1
- data/lib/shiplog/configuration.rb +155 -2
- data/lib/shiplog/github/client.rb +42 -9
- data/lib/shiplog/github/errors.rb +3 -0
- data/lib/shiplog/github/queries.rb +32 -1
- data/lib/shiplog/version.rb +1 -1
- metadata +10 -1
|
@@ -27,6 +27,9 @@ module Shiplog
|
|
|
27
27
|
PULL_REQUEST_WITH_ISSUES = <<~GRAPHQL.freeze
|
|
28
28
|
fragment PullRequestWithIssues on PullRequest {
|
|
29
29
|
...PullRequestFields
|
|
30
|
+
baseRefOid
|
|
31
|
+
mergeCommit { oid parents(first: 1) { nodes { oid } } }
|
|
32
|
+
files(first: 100) { pageInfo { hasNextPage } nodes { path } }
|
|
30
33
|
closingIssuesReferences(first: 20) {
|
|
31
34
|
pageInfo { hasNextPage }
|
|
32
35
|
nodes { id }
|
|
@@ -102,7 +105,35 @@ module Shiplog
|
|
|
102
105
|
}
|
|
103
106
|
GRAPHQL
|
|
104
107
|
|
|
105
|
-
|
|
108
|
+
# A file's text at a commit (`$expression` is "<oid>:<path>"); `object` is null when the file is absent.
|
|
109
|
+
BLOB_TEXT = <<~GRAPHQL.freeze
|
|
110
|
+
query($owner: String!, $name: String!, $expression: String!) {
|
|
111
|
+
repository(owner: $owner, name: $name) {
|
|
112
|
+
object(expression: $expression) {
|
|
113
|
+
... on Blob { text isTruncated }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
GRAPHQL
|
|
118
|
+
|
|
119
|
+
# The pull requests that introduced each commit (`$ids` are commit node ids, at most 100).
|
|
120
|
+
COMMIT_PULL_REQUESTS = <<~GRAPHQL.freeze
|
|
121
|
+
query($ids: [ID!]!) {
|
|
122
|
+
nodes(ids: $ids) {
|
|
123
|
+
... on Commit {
|
|
124
|
+
oid
|
|
125
|
+
associatedPullRequests(first: 5) {
|
|
126
|
+
nodes {
|
|
127
|
+
number title body url state
|
|
128
|
+
repository { nameWithOwner }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
GRAPHQL
|
|
135
|
+
|
|
136
|
+
ALL = { ISSUES:, PULL_REQUESTS:, ISSUE:, PULL_REQUEST:, COMMITS:, BLOB_TEXT:, COMMIT_PULL_REQUESTS: }.freeze
|
|
106
137
|
end
|
|
107
138
|
end
|
|
108
139
|
end
|
data/lib/shiplog/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shiplog
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Trackberry
|
|
@@ -59,9 +59,12 @@ files:
|
|
|
59
59
|
- app/frontend/shiplog/shiplog.css
|
|
60
60
|
- app/helpers/shiplog/admin/entries_helper.rb
|
|
61
61
|
- app/helpers/shiplog/application_helper.rb
|
|
62
|
+
- app/helpers/shiplog/callable_helper.rb
|
|
62
63
|
- app/helpers/shiplog/frontend_helper.rb
|
|
63
64
|
- app/helpers/shiplog/host_routes_helper.rb
|
|
65
|
+
- app/helpers/shiplog/roadmap_helper.rb
|
|
64
66
|
- app/helpers/shiplog/styling_helper.rb
|
|
67
|
+
- app/helpers/shiplog/switcher_helper.rb
|
|
65
68
|
- app/jobs/shiplog/application_job.rb
|
|
66
69
|
- app/jobs/shiplog/refresh_job.rb
|
|
67
70
|
- app/jobs/shiplog/rewrite_entry_job.rb
|
|
@@ -77,6 +80,7 @@ files:
|
|
|
77
80
|
- app/models/shiplog/issue_form.rb
|
|
78
81
|
- app/models/shiplog/issue_link.rb
|
|
79
82
|
- app/models/shiplog/pull_request.rb
|
|
83
|
+
- app/models/shiplog/pull_request_upgrade.rb
|
|
80
84
|
- app/models/shiplog/repository.rb
|
|
81
85
|
- app/models/shiplog/rewriter.rb
|
|
82
86
|
- app/models/shiplog/rewriter/prompt.rb
|
|
@@ -87,6 +91,7 @@ files:
|
|
|
87
91
|
- app/models/shiplog/sync/node_attributes.rb
|
|
88
92
|
- app/models/shiplog/sync/pull_request_importer.rb
|
|
89
93
|
- app/models/shiplog/sync/repository_sync.rb
|
|
94
|
+
- app/models/shiplog/sync/upgrade_detector.rb
|
|
90
95
|
- app/models/shiplog/webhook_delivery.rb
|
|
91
96
|
- app/models/shiplog/webhook_signature.rb
|
|
92
97
|
- app/views/layouts/shiplog/admin.html.erb
|
|
@@ -95,6 +100,7 @@ files:
|
|
|
95
100
|
- app/views/shiplog/_page.html.erb
|
|
96
101
|
- app/views/shiplog/_page_header.html.erb
|
|
97
102
|
- app/views/shiplog/_pagination.html.erb
|
|
103
|
+
- app/views/shiplog/_switcher.html.erb
|
|
98
104
|
- app/views/shiplog/admin/_assets.html.erb
|
|
99
105
|
- app/views/shiplog/admin/_custom_head.html.erb
|
|
100
106
|
- app/views/shiplog/admin/_nav.html.erb
|
|
@@ -108,14 +114,17 @@ files:
|
|
|
108
114
|
- app/views/shiplog/admin/syncs/show.html.erb
|
|
109
115
|
- app/views/shiplog/changelogs/_entry.html.erb
|
|
110
116
|
- app/views/shiplog/changelogs/_month.html.erb
|
|
117
|
+
- app/views/shiplog/changelogs/_search.html.erb
|
|
111
118
|
- app/views/shiplog/changelogs/show.html.erb
|
|
112
119
|
- app/views/shiplog/roadmaps/_card.html.erb
|
|
113
120
|
- app/views/shiplog/roadmaps/_column.html.erb
|
|
121
|
+
- app/views/shiplog/roadmaps/_shipped.html.erb
|
|
114
122
|
- app/views/shiplog/roadmaps/show.html.erb
|
|
115
123
|
- config/admin_routes.rb
|
|
116
124
|
- config/locales/en.yml
|
|
117
125
|
- config/routes.rb
|
|
118
126
|
- db/migrate/20261026000001_create_shiplog_tables.rb
|
|
127
|
+
- db/migrate/20261027000001_create_shiplog_pull_request_upgrades.rb
|
|
119
128
|
- lib/generators/shiplog/install/install_generator.rb
|
|
120
129
|
- lib/generators/shiplog/install/templates/initializer.rb.tt
|
|
121
130
|
- lib/generators/shiplog/install/templates/shiplog-feature.yml
|