-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This model is in charge of keeping track of build failures that we find when polling the Travis API. Used to avoid spamming gitter with extra notifications, but also can be used to identify that a branch has previously been broken and now has been fixed. Makes sense to also notify on the passing cases so others aren't taking the time to investigate a failure when this has already been investigated.
- Loading branch information
1 parent
d1623cc
commit ff30f83
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class BuildFailure < ActiveRecord::Base | ||
belongs_to :repo | ||
belongs_to :branch | ||
|
||
def notify | ||
|
||
end | ||
|
||
def still_broken? | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class CreateBuildFailures < ActiveRecord::Migration | ||
def change | ||
create_table :build_failures do |t| | ||
t.integer :repo_id | ||
t.integer :branch_id | ||
t.integer :travis_build_id | ||
|
||
t.datetime :last_notified_at | ||
t.timestamps | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters