mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
Docs: issue templates
- rename feature "request" to "suggestion" and make it clear they will have to build it - rename Bug_report.md to bug_report.md because we are not savages - slightly stronger wording re: usage questions [ci skip]
This commit is contained in:
parent
ad093e7ca0
commit
b8101ed161
5 changed files with 108 additions and 120 deletions
13
.github/ISSUE_TEMPLATE.md
vendored
13
.github/ISSUE_TEMPLATE.md
vendored
|
@ -1,13 +0,0 @@
|
|||
Thanks for your interest in PaperTrail! Our volunteers' time is limited, so we
|
||||
can only respond on GitHub to *bug reports* and *feature requests*.
|
||||
|
||||
Please ask *usage questions* on StackOverflow:
|
||||
https://stackoverflow.com/tags/paper-trail-gem
|
||||
|
||||
Bug reports must use this template:
|
||||
https://github.com/paper-trail-gem/paper_trail/blob/master/doc/bug_report_template.rb
|
||||
|
||||
For other questions, please see our contributing guide:
|
||||
https://github.com/paper-trail-gem/paper_trail/blob/master/.github/CONTRIBUTING.md
|
||||
|
||||
Thanks for your contribution!
|
19
.github/ISSUE_TEMPLATE/Feature_request.md
vendored
19
.github/ISSUE_TEMPLATE/Feature_request.md
vendored
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
Please ask *usage* questions on [StackOverflow](https://stackoverflow.com/tags/paper-trail-gem).
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
|
@ -1,86 +1,87 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
Please ask *usage* questions on [StackOverflow](https://stackoverflow.com/tags/paper-trail-gem).
|
||||
|
||||
Use the following template to report bugs:
|
||||
|
||||
```ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Please include only the minimum code necessary to reproduce your issue.
|
||||
require "bundler/inline"
|
||||
|
||||
# STEP ONE: What versions are you using?
|
||||
gemfile(true) do
|
||||
ruby "2.4.2"
|
||||
source "https://rubygems.org"
|
||||
gem "activerecord", "5.1.4"
|
||||
gem "minitest", "5.10.3"
|
||||
gem "paper_trail", "8.0.0", require: false
|
||||
gem "sqlite3"
|
||||
end
|
||||
|
||||
require "active_record"
|
||||
require "minitest/autorun"
|
||||
require "logger"
|
||||
|
||||
# Please use sqlite for your bug reports, if possible.
|
||||
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
|
||||
ActiveRecord::Base.logger = nil
|
||||
ActiveRecord::Schema.define do
|
||||
# STEP TWO: Define your tables here.
|
||||
create_table :users, force: true do |t|
|
||||
t.text :first_name, null: false
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
create_table :versions do |t|
|
||||
t.string :item_type, null: false
|
||||
t.integer :item_id, null: false
|
||||
t.string :event, null: false
|
||||
t.string :whodunnit
|
||||
t.text :object, limit: 1_073_741_823
|
||||
t.text :object_changes, limit: 1_073_741_823
|
||||
t.integer :transaction_id
|
||||
t.datetime :created_at
|
||||
end
|
||||
add_index :versions, %i[item_type item_id]
|
||||
add_index :versions, [:transaction_id]
|
||||
|
||||
create_table :version_associations do |t|
|
||||
t.integer :version_id
|
||||
t.string :foreign_key_name, null: false
|
||||
t.integer :foreign_key_id
|
||||
end
|
||||
add_index :version_associations, [:version_id]
|
||||
add_index :version_associations, %i[foreign_key_name foreign_key_id],
|
||||
name: "index_version_associations_on_foreign_key"
|
||||
end
|
||||
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
||||
require "paper_trail/config"
|
||||
|
||||
# STEP THREE: Configure PaperTrail as you would in your initializer
|
||||
PaperTrail::Config.instance.track_associations = true
|
||||
|
||||
require "paper_trail"
|
||||
|
||||
# STEP FOUR: Define your AR models here.
|
||||
class User < ActiveRecord::Base
|
||||
has_paper_trail
|
||||
end
|
||||
|
||||
# STEP FIVE: Please write a test that demonstrates your issue.
|
||||
class BugTest < ActiveSupport::TestCase
|
||||
def test_1
|
||||
assert_difference(-> { PaperTrail::Version.count }, +1) {
|
||||
User.create(first_name: "Jane")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
# STEP SIX: Run this script using `ruby my_bug_report.rb`
|
||||
```
|
||||
---
|
||||
name: Bug Report
|
||||
about: You will be asked to provide a script that reproduces the bug, based on our template.
|
||||
|
||||
---
|
||||
|
||||
Due to limited volunteers, we cannot answer *usage* questions. Please ask such
|
||||
questions on [StackOverflow](https://stackoverflow.com/tags/paper-trail-gem).
|
||||
|
||||
Use the following template to report bugs:
|
||||
|
||||
```ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Please include only the minimum code necessary to reproduce your issue.
|
||||
require "bundler/inline"
|
||||
|
||||
# STEP ONE: What versions are you using?
|
||||
gemfile(true) do
|
||||
ruby "2.4.2"
|
||||
source "https://rubygems.org"
|
||||
gem "activerecord", "5.1.4"
|
||||
gem "minitest", "5.10.3"
|
||||
gem "paper_trail", "9.1.0", require: false
|
||||
gem "sqlite3"
|
||||
end
|
||||
|
||||
require "active_record"
|
||||
require "minitest/autorun"
|
||||
require "logger"
|
||||
|
||||
# Please use sqlite for your bug reports, if possible.
|
||||
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
|
||||
ActiveRecord::Base.logger = nil
|
||||
ActiveRecord::Schema.define do
|
||||
# STEP TWO: Define your tables here.
|
||||
create_table :users, force: true do |t|
|
||||
t.text :first_name, null: false
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
create_table :versions do |t|
|
||||
t.string :item_type, null: false
|
||||
t.integer :item_id, null: false
|
||||
t.string :event, null: false
|
||||
t.string :whodunnit
|
||||
t.text :object, limit: 1_073_741_823
|
||||
t.text :object_changes, limit: 1_073_741_823
|
||||
t.integer :transaction_id
|
||||
t.datetime :created_at
|
||||
end
|
||||
add_index :versions, %i[item_type item_id]
|
||||
add_index :versions, [:transaction_id]
|
||||
|
||||
create_table :version_associations do |t|
|
||||
t.integer :version_id
|
||||
t.string :foreign_key_name, null: false
|
||||
t.integer :foreign_key_id
|
||||
end
|
||||
add_index :version_associations, [:version_id]
|
||||
add_index :version_associations, %i[foreign_key_name foreign_key_id],
|
||||
name: "index_version_associations_on_foreign_key"
|
||||
end
|
||||
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
||||
require "paper_trail/config"
|
||||
|
||||
# STEP THREE: Configure PaperTrail as you would in your initializer
|
||||
PaperTrail::Config.instance.track_associations = false
|
||||
|
||||
require "paper_trail"
|
||||
|
||||
# STEP FOUR: Define your AR models here.
|
||||
class User < ActiveRecord::Base
|
||||
has_paper_trail
|
||||
end
|
||||
|
||||
# STEP FIVE: Write a test that demonstrates your issue by failing.
|
||||
class BugTest < ActiveSupport::TestCase
|
||||
def test_1
|
||||
assert_difference(-> { PaperTrail::Version.count }, +1) {
|
||||
User.create(first_name: "Jane")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
# STEP SIX: Run this script using `ruby my_bug_report.rb`
|
||||
```
|
19
.github/ISSUE_TEMPLATE/feature_suggestion.md
vendored
Normal file
19
.github/ISSUE_TEMPLATE/feature_suggestion.md
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Feature Suggestion
|
||||
about: Suggest something that you would like to build
|
||||
|
||||
---
|
||||
|
||||
Due to limited volunteers, we cannot answer *usage* questions. Please ask such
|
||||
questions on [StackOverflow](https://stackoverflow.com/tags/paper-trail-gem).
|
||||
|
||||
**Is your feature suggestion related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always
|
||||
frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like to build**
|
||||
A clear and concise description of what you want to build.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've
|
||||
considered.
|
|
@ -19,8 +19,8 @@ For instructions on how to file a bug report, please see our [issue template][3]
|
|||
## Responses to Common Problems
|
||||
|
||||
```
|
||||
Thanks for the bug report. Per our [contributing guide][1] please use
|
||||
our [bug report template][2].
|
||||
Thanks for the bug report. All bug reports are required to use our
|
||||
[bug report template][2]. See also our [contributing guide][1].
|
||||
|
||||
[1]: https://github.com/paper-trail-gem/paper_trail/blob/master/.github/CONTRIBUTING.md
|
||||
[2]: https://github.com/paper-trail-gem/paper_trail/blob/master/doc/bug_report_template.rb
|
||||
|
|
Loading…
Reference in a new issue