Skip to content

Commit 31b9eaf

Browse files
Merge #412
412: Improve issue templates r=ellnix a=ellnix Equivalent to meilisearch/meilisearch-ruby#612 Co-authored-by: ellnix <[email protected]>
2 parents 9d110f8 + 69e1bee commit 31b9eaf

File tree

2 files changed

+164
-21
lines changed

2 files changed

+164
-21
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 154 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,166 @@
22
name: Bug Report 🐞
33
about: Create a report to help us improve.
44
title: ''
5-
labels: ''
5+
labels: ["bug"]
66
assignees: ''
77
---
88

99
<!-- This is not an exhaustive model but a help. No step is mandatory. -->
1010

11-
**Description**
12-
Description of what the bug is about.
11+
### Description
12+
<!-- Description of what the bug is about. -->
1313

14-
**Expected behavior**
15-
What you expected to happen.
14+
### Expected behavior
15+
<!-- What you expected to happen. -->
1616

17-
**Current behavior**
18-
What happened.
17+
### Current behavior
18+
<!-- What happened. -->
1919

20-
**Screenshots or Logs**
21-
If applicable, add screenshots or logs to help explain your problem.
20+
### Screenshots or logs
21+
<!-- If applicable, add screenshots or logs to help explain your problem. -->
2222

23-
**Environment (please complete the following information):**
24-
- OS: [e.g. Debian GNU/Linux]
25-
- Meilisearch server version: [e.g. v.0.20.0]
26-
- meilisearch-rails version: [e.g v0.1.0]
27-
- Rails version: [e.g. 6.1.3.2]
23+
### Environment
24+
**Operating System** [e.g. Debian GNU/Linux] (`cat /etc/*-release | head -n1`):
25+
26+
**Meilisearch version** (`./meilisearch --version`):
27+
28+
**meilisearch-rails version** (`bundle info meilisearch-rails`):
29+
30+
**rails version** (`bundle info rails`):
31+
32+
### Reproduction script:
33+
34+
<!-- Write a script that reproduces your issue. Feel free to get started with the example below -->
35+
36+
<!--
37+
```ruby
38+
require "bundler/inline"
39+
40+
gemfile(true) do
41+
source "https://rubygems.org"
42+
ruby '3.3.7'
43+
44+
gem 'minitest', '~> 5.25', '>= 5.25.4'
45+
gem 'rails', '~> 8.0', '>= 8.0.2'
46+
gem 'sqlite3', '~> 2', platform: %i[rbx ruby]
47+
gem 'jdbc-sqlite3', platform: :jruby
48+
49+
gem 'meilisearch-rails', ENV["MEILISEARCH_RAILS_VERSION"] || "~> 0.14.2"
50+
# If you want to test against changes that have been not released yet
51+
# gem "meilisearch-rails", github: "meilisearch/meilisearch-rails", branch: 'main'
52+
53+
# Use MongoDB
54+
# gem 'mongoid', '~> 9.0', '>= 9.0.6'
55+
56+
# Use Sequel
57+
# gem 'sequel', '~> 5.90'
58+
59+
# Open a debugging session with the `debugger` method
60+
# gem 'debug'
61+
end
62+
63+
require 'minitest/autorun'
64+
65+
MeiliSearch::Rails.configuration = {
66+
meilisearch_url: ENV.fetch('MEILISEARCH_HOST', 'http://127.0.0.1:7700'),
67+
meilisearch_api_key: ENV.fetch('MEILISEARCH_API_KEY', 'masterKey'),
68+
per_environment: true
69+
}
70+
71+
###############################
72+
# ActiveRecord database setup #
73+
###############################
74+
# require 'active_record'
75+
#
76+
# ar_db_file = Tempfile.new
77+
# ActiveRecord::Base.establish_connection(
78+
# 'adapter' => defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3',
79+
# 'database' => ar_db_file.path,
80+
# 'pool' => 5,
81+
# 'timeout' => 5000
82+
# )
83+
#
84+
# ActiveRecord::Schema[8.0].define do
85+
# create_table "ar_books", force: :cascade do |t|
86+
# t.string "title"
87+
# t.string "author"
88+
# t.datetime "created_at", null: false
89+
# t.datetime "updated_at", null: false
90+
# end
91+
# end
92+
#
93+
# class ArBook < ActiveRecord::Base
94+
# include MeiliSearch::Rails
95+
#
96+
# meilisearch
97+
# end
98+
99+
#########################
100+
# Sequel database setup #
101+
#########################
102+
# require 'sequel'
103+
#
104+
# def sequel_db
105+
# @sequel_db_file ||= Tempfile.new
106+
# @sequel_db ||= Sequel.connect(if defined?(JRUBY_VERSION)
107+
# "jdbc:sqlite:#{@sequel_db_file.path}"
108+
# else
109+
# { 'adapter' => 'sqlite',
110+
# 'database' => @sequel_db_file.path }
111+
# end)
112+
# end
113+
#
114+
# sequel_db.create_table(:sequel_books) do
115+
# primary_key :id
116+
# String :title
117+
# String :author
118+
# end
119+
#
120+
# class SequelBook < Sequel::Model(sequel_db)
121+
# plugin :active_model
122+
# include MeiliSearch::Rails
123+
#
124+
# meilisearch
125+
# end
126+
127+
##########################
128+
# Mongoid database setup #
129+
##########################
130+
# Mongoid.load_configuration({
131+
# clients: {
132+
# default: {
133+
# database: "bug_report_#{SecureRandom.hex(8)}",
134+
# hosts: ['localhost:27017'],
135+
# options: {
136+
# read: { mode: :primary },
137+
# max_pool_size: 1
138+
# }
139+
# }
140+
# }
141+
# })
142+
#
143+
# class MongoBook
144+
# include Mongoid::Document
145+
# include Mongoid::Timestamps
146+
#
147+
# field :title, type: String
148+
# field :price_cents, type: Integer
149+
#
150+
# include MeiliSearch::Rails
151+
#
152+
# meilisearch
153+
# end
154+
155+
# Run this method before searching to make sure Meilisearch is up to date
156+
def await_last_task
157+
task = MeiliSearch::Rails.client.tasks['results'].first
158+
MeiliSearch::Rails.client.wait_for_task task['uid']
159+
end
160+
161+
class BugTest < Minitest::Test
162+
def test_my_bug
163+
# your code here
164+
end
165+
end
166+
```
167+
-->

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22
name: Feature Request & Enhancement 💡
33
about: Suggest a new idea for the project.
44
title: ''
5-
labels: ''
5+
labels: ["enhancement"]
66
assignees: ''
77
---
88

99
<!-- This is not an exhaustive model but a help. No step is mandatory. -->
1010

11-
**Description**
12-
Brief explanation of the feature.
11+
### Description
12+
<!-- Brief explanation of the feature. -->
1313

14-
**Basic example**
15-
If the proposal involves something new or a change, include a basic example. How would you use the feature? In which context?
14+
### Basic example
15+
<!--
16+
If the proposal involves something new or a change, include a basic example.
17+
How would you use the feature? In which context?
18+
-->
1619

17-
**Other**
18-
Any other things you want to add.
20+
### Other
21+
<!-- Any other things you want to add. -->

0 commit comments

Comments
 (0)