diff --git a/.codespellrc b/.codespellrc
new file mode 100644
index 00000000..f60bf29a
--- /dev/null
+++ b/.codespellrc
@@ -0,0 +1,6 @@
+[codespell]
+# Ref: https://github.com/codespell-project/codespell#using-a-config-file
+skip = .git*,*.lock,.codespellrc,paper.bib
+check-hidden = true
+# ignore-regex =
+# ignore-words-list =
diff --git a/app/lib/defaults.rb b/app/lib/defaults.rb
index 9464c189..84c5e3f9 100644
--- a/app/lib/defaults.rb
+++ b/app/lib/defaults.rb
@@ -3,7 +3,7 @@
module Defaults
# Default value for needed env settings.
- # Can be overriden from the config/settings YAML file.
+ # Can be overridden from the config/settings YAML file.
def default_settings
@defaults ||= Sinatra::IndifferentHash[
bot_github_user: ENV['BUFFY_BOT_GH_USER'],
diff --git a/app/lib/responder.rb b/app/lib/responder.rb
index f094dfb9..915f43e6 100644
--- a/app/lib/responder.rb
+++ b/app/lib/responder.rb
@@ -295,14 +295,14 @@ def process_reverse_labeling
# Finds the value of the url of the target-repository in the body of the issue
# by default reads the field called "target-repository"
- # unless a diferent name is set using param :url_field
+ # unless a different name is set using param :url_field
def target_repo_value
@target_repo_url ||= value_of_or_default(params[:url_field], "target-repository")
end
# Finds the name of the branch in the body of the issue
# by default reads the field called "branch"
- # unless a diferent name is set using param :branch_field
+ # unless a different name is set using param :branch_field
# or if it comes in the match_data in the specified position
def branch_name_value(branch_index=1)
if @match_data.nil? || @match_data[branch_index].nil?
@@ -317,12 +317,12 @@ def hidden?
params[:hidden] == true
end
- # Default description can be overriden by config param
+ # Default description can be overridden by config param
def description
params[:description] || default_description
end
- # Default example_invocation can be overriden by config param
+ # Default example_invocation can be overridden by config param
def example_invocation
params[:example_invocation] || default_example_invocation
end
diff --git a/docs/configuration.md b/docs/configuration.md
index 936921eb..3c16ce52 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -172,8 +172,8 @@ The _env_ section is used to declare general key/value settings. For security re
This setting is used to impose conditions on the responder. It can include several options:
```eval_rst
-:title: ** or ** Responder will run only if issue' title matches this.
-:body: ** or ** Responder will run only if the body of the issue matches this.
+:title: ** or ** Responder will run only if issue' title matches this.
+:body: ** or ** Responder will run only if the body of the issue matches this.
:value_exists: ** Responder will run only if there is a not empty value for this in the issue (marked with HTML comments).
:value_matches: ** Responder will run only if the param values (marked with HTML comments) in the body of the issue matches the ones specified here.
:role_assigned: ** Responder will be run only if there is a username assigned for the specified value.
diff --git a/docs/custom_responder.md b/docs/custom_responder.md
index a4547c7c..748f4df4 100644
--- a/docs/custom_responder.md
+++ b/docs/custom_responder.md
@@ -74,7 +74,7 @@ When an event is sent from the reviews repository to Buffy, only responders that
#### Event regex
The _@event_regex_ variable is where the syntax of every specific command is declared. If it is `nil` the responder will respond to every event that matches _@event_action_.
-Inside this method you have available the name of the bot in the `@botname` instace variable and all the parameters for this responder from the config file in the `@params` instance variable.
+Inside this method you have available the name of the bot in the `@botname` instance variable and all the parameters for this responder from the config file in the `@params` instance variable.
For our example, we will be listening to comments and we want the command to be "what time is it?":
```ruby
diff --git a/docs/installation.md b/docs/installation.md
index f073c4e5..c1586cbe 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -36,7 +36,7 @@ This will be the "user" responding to the commands issued from a reviews reposit
Some applications and services must be available to use by Buffy:
- **[Redis](https://redis.io/)**: To process background jobs Buffy needs `redis` installed.
-- **[cloc](https://github.com/AlDanial/cloc)**: The *Respository Checks Responder* can analyze source code, to run this check `cloc` is used.
+- **[cloc](https://github.com/AlDanial/cloc)**: The *Repository Checks Responder* can analyze source code, to run this check `cloc` is used.
#### Deployment
diff --git a/docs/labeling.md b/docs/labeling.md
index 3155e162..0395c976 100644
--- a/docs/labeling.md
+++ b/docs/labeling.md
@@ -24,7 +24,7 @@ Responders allowing labeling will accept in their settings two keys:
- pending-review
...
```
-If the example responder is successfull the `review-finished` and `recommend publication` labels will be added and the `pending-review` label will be removed from the issue.
+If the example responder is successful the `review-finished` and `recommend publication` labels will be added and the `pending-review` label will be removed from the issue.
## Responders listening to Add/Remove actions
diff --git a/docs/responders/external_service.md b/docs/responders/external_service.md
index fa30722b..09d20f3e 100644
--- a/docs/responders/external_service.md
+++ b/docs/responders/external_service.md
@@ -116,7 +116,7 @@ Later, a POST request will be sent to https://dummy-external-service.herokuapp.c
"secret": "A1234567890Z", # declared in the query_params setting
"target-repo":"...", # the value is extracted from the body of the issue
"id":"...", # the value corresponds to issue_id, it has been mapped to id
- "repo":"...", # the origin repo where the invocation happend
+ "repo":"...", # the origin repo where the invocation happenedd
"sender":"...", # the user invoking the command
"bot_name":"...", # the bot user name that will be responding
}
diff --git a/docs/responders/goodbye.md b/docs/responders/goodbye.md
index 86bdd66c..fdf819fd 100644
--- a/docs/responders/goodbye.md
+++ b/docs/responders/goodbye.md
@@ -41,7 +41,7 @@ To reply with a template file:
Calling an external service:
```eval_rst
-:external_service: All the configuration for the service is nested under this param. Posible options are:
+:external_service: All the configuration for the service is nested under this param. Possible options are:
:name: *Required*. The name for this service.
:url: *Required*. The url to call.
@@ -105,7 +105,7 @@ When a new issue is closed the responder will send a POST request to https://dum
"secret": "A1234567890Z", # declared in the query_params setting
"target-repo":"...", # the value is extracted from the body of the issue
"id":"...", # the value corresponds to issue_id, it has been mapped to id
- "repo":"...", # the origin repo where the invocation happend
+ "repo":"...", # the origin repo where the invocation happenedd
"sender":"...", # the user invoking the command
"bot_name":"...", # the bot user name that will be responding
}
diff --git a/docs/responders/welcome.md b/docs/responders/welcome.md
index 8873cb66..53bc52e8 100644
--- a/docs/responders/welcome.md
+++ b/docs/responders/welcome.md
@@ -79,7 +79,7 @@ To reply with a template file:
Calling an external service:
```eval_rst
-:external_service: All the configuration for the service is nested under this param. Posible options are:
+:external_service: All the configuration for the service is nested under this param. Possible options are:
:name: *Required*. The name for this service.
:url: *Required*. The url to call.
@@ -163,7 +163,7 @@ When a new issue is created the responder will send a POST request to https://du
"secret": "A1234567890Z", # declared in the query_params setting
"target-repo":"...", # the value is extracted from the body of the issue
"id":"...", # the value corresponds to issue_id, it has been mapped to id
- "repo":"...", # the origin repo where the invocation happend
+ "repo":"...", # the origin repo where the invocation happenedd
"sender":"...", # the user invoking the command
"bot_name":"...", # the bot user name that will be responding
}
diff --git a/spec/responder_spec.rb b/spec/responder_spec.rb
index 801ffd97..225bdd54 100644
--- a/spec/responder_spec.rb
+++ b/spec/responder_spec.rb
@@ -61,7 +61,7 @@
expect(subject.authorized?(@context)).to be_truthy
end
- it "should be true if sender is listed in an autorized role in the issue" do
+ it "should be true if sender is listed in an authorized role in the issue" do
subject.params = { authorized_roles_in_issue: 'reviewers' }
@context[:issue_body] = "@rev1, @sender"
subject.context = @context
@@ -70,7 +70,7 @@
expect(subject.authorized?(@context)).to be_truthy
end
- it "should be true if sender is not in an autorized role but is in authorized team" do
+ it "should be true if sender is not in an authorized role but is in authorized team" do
@context[:issue_body] = "@rev1, @rev2"
subject.params = { only: 'editors', authorized_roles_in_issue: 'reviewers'}
subject.context = @context
@@ -79,7 +79,7 @@
expect(subject.authorized?(@context)).to be_truthy
end
- it "should be true if sender is not in an autorized team but is in authorized role" do
+ it "should be true if sender is not in an authorized team but is in authorized role" do
@context[:issue_body] = "@rev1, @sender"
subject.params = { only: 'editors', authorized_roles_in_issue: 'reviewers'}
subject.context = @context
@@ -88,7 +88,7 @@
expect(subject.authorized?(@context)).to be_truthy
end
- it "should be true if sender is in an autorized team and in authorized role" do
+ it "should be true if sender is in an authorized team and in authorized role" do
@context[:issue_body] = "@rev1, @sender"
subject.params = { only: 'editors', authorized_roles_in_issue: 'reviewers'}
subject.context = @context
diff --git a/spec/responders/add_and_remove_assignee_responder_spec.rb b/spec/responders/add_and_remove_assignee_responder_spec.rb
index ef9ec15b..a1cb53c1 100644
--- a/spec/responders/add_and_remove_assignee_responder_spec.rb
+++ b/spec/responders/add_and_remove_assignee_responder_spec.rb
@@ -36,7 +36,7 @@
@responder.match_data = @responder.event_regex.match(@msg)
end
- it "should add user as assignee if posible" do
+ it "should add user as assignee if possible" do
expect_any_instance_of(Octokit::Client).to receive(:check_assignee).once.and_return(true)
expect(@responder).to_not receive(:remove_assignee)
expect(@responder).to receive(:add_assignee).with("@arfon")
diff --git a/spec/utilities_spec.rb b/spec/utilities_spec.rb
index 7a14543f..dbb39678 100644
--- a/spec/utilities_spec.rb
+++ b/spec/utilities_spec.rb
@@ -16,7 +16,7 @@ class TestingUtilities
end
describe "#clone_repo" do
- it "should return true when succesfully cloned a repo to a local path" do
+ it "should return true when successfully cloned a repo to a local path" do
expect(Open3).to receive(:capture3).
with("git clone http:/repository-url.com ./local/folder").
and_return(["OK", "", OpenStruct.new(success?: true)])