GithubHelp home page GithubHelp logo

sobotics / burnaki Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 169 KB

Application for monitoring burnination efforts on the Stack Exchange network.

Java 99.53% Dockerfile 0.25% Shell 0.22%
stack-exchange burnination stack-exchange-chat

burnaki's Introduction

Burnaki

The purpose of this project is to monitor burnination efforts on the Stack Exchange network. The goals are threefold:

  • tracking the progress by watching for close votes / reopen votes / delete votes and edits made to questions on the burninated tag.
  • posting notifications on important events (e.g. new question posted, closure or deletion) by a chat bot in dedicated chat rooms.
  • helping the burnination by providing a review for delete candidates.

Tracking

This project only relies on the Stack Exchange API and no screen-scraping is performed. During a burnination, the list of questions having the burninated tag are stored, and their status are updated every 5 minutes.

The information that is tracked are edits, close votes, reopen votes, deletion by the system (a.k.a., the roomba) and deletion by users. Since the API does not return deleted questions, the tracking logic considers a question is deleted when it is not returned by the API anymore. To distinguish between a manual and a system deletion, it performs a best guess based on the roomba logic.

Progress is monitored and updated every hour. Each question has its history throughout the burnination stored (date of a retag, date of a closure...).

Notifications

During a burnination process of a tag, notifications will be sent to the dedicated chat room:

  • When a question has been closed. The goal is to ensure the question gets attraction for a potential inappropriate close.
  • When a reopen vote is cast on a closed question. This means that the question was potentially wrongly closed during the effort and needs to be re-reviewed.
  • When an edit is made, or has been suggested, to a question removing the tag being burninated. This helps to track which questions were edited and potentially act on wrong edits or users on an edit-spree.
  • When a question is deleted. In the same way as closed questions, the goal is to make sure the question gets another review.
  • When a question is undeleted. This means that the question was wrongly deleted and needs attention. NOTE: the Stack Exchange API does not return deleted posts, so it is not possible to raise a notification when an undelete vote is cast.
  • When a new question is posted.

Notifications are sent by batches every 5 minutes. An example is:

Closed: Codeigniter on Godaddy results in 404 removing index.php, GoDaddy issues with directory (differences with "webroot" and "root"), godaddy shared hosting NICE command path and PHP path.

Chat bot

The chat bot head quarters is the SOCVFinder chat room. It can handle multiple burnination efforts at the same time but there can only be one chat room for a given burninated tag.

Every command can be run either in the dedicated burn room, or in the HQ room. As convenience, the [tag] can be omitted from the commands if it is ran inside the dedicated burn room.

@burnaki start tag [tag] [roomId] [link to Meta]

This command starts the burnination process of the given tag. All questions with that tag will be queried from Stack Exchange API and stored. The bot will then start the notification process for the configured chat room.

@burnaki get progress [tag]

This command outputs the current progress of the burnination: number of opened questions / number of closed questions / number of retagged questions / number of deleted questions (either manually or by the roomba). An example message is:

Here's a recap of the efforts so far for [godaddy]: Total questions (1563), Retagged (261), Closed (1213), Roombad (287), Manually deleted (101).

It also prints a graph of the progress:

Burnination progress

@burnaki update progress [tag]

The progress is updated automatically every hour. This command forces an update of the progress immediatly.

@burnaki delete candidates [tag]

This command queries all posts that are eligible for deletion. It queries posts that have a score <= -1, are closed since more than 2 days and have at least one answer. It also returns posts with pending delete votes.

Sample list

@burnaki stop tag [tag]

This command ends the burnination process of the given tag. No new notifications will be sent.

Database schema

  • Burnination(Id, Tag, StartDate, EndDate, LastRefreshDate, MetaLink, RoomId) - This table holds meta-data for the tag burnination itself. The roomId corresponds to the chat room being the head-quarters of the burnination effort.
  • BurninationQuestion(#Burnination, QuestionId, Title, Link, ShareLink, Score, ViewCount, AnswerCount, CommentCount, Locked, Migrated, Answered, AcceptedAnswerId, Tags, CreatedDate, ClosedAsDuplicate, DeletedDate, LastEditDate, CloseVoteCount, ReopenVoteCount, DeleteVoteCount, UndeleteVoteCount, Closed, Roombad, ManuallyDeleted, Retagged) - This table is a snapshot of the state of all the questions at the current date and serves as base for notifications. All of the information stored is necessary to determine if a deletion probably occured from the system or from users.
  • BurninationQuestionHistory(#BurninationQuestion, EventDate, EventType) - This table holds the history for a given question in a tag under burnination. The events corresponds to closed / retagged / deleted and so on.
  • BurninationProgress(#Burnination, ProgressDate, TotalQuestions, Closed, Roombad, ManuallyDeleted, Retagged, OpenedWithTag) - This table holds the progress made at a given date. It will be updated automatically every hour based on the current state of BurninationQuestion.

Accounts

The bot runs under the user Burnaki and sits in the SOBotics chat room on Stack Overflow.

burnaki's People

Contributors

jdd-software avatar tunaki avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jmcabandara

burnaki's Issues

Help and alive command

help and alive commands need to be implemented for Burnaki. The alive command is very important.

Update chatexchange library

As you might have heard, Stack Exchange will remove OpenID.

Since tunaki/chatexchange is currently using OpenID to connect to chat, we had to release an update. If you don't update, you won't be able to connect to chat after July 25, 2018.

We've moved the project to org.sobotics.*. This is the updated dependency:

<dependency>
  <groupId>org.sobotics</groupId>
  <artifactId>chatexchange</artifactId>
  <version>2.0.0</version>
</dependency>

You'll have to update your import statements. All APIs are still the same, so you don't have to modify the implementation.

If you have issues updating your project, feel free to ask for help in our chatroom.

Web UI to show deleted questions

As a user with less than 10k rep I can't view the deleted questions Burnaki reports.

Would it be feasible and practical to display deleted posts in one of the SOBotics web UIs?

Update to Spring boot 2.0

Spring boot 2.0 has been released since march 2018, and even though there's still an LTS for Spring boot 1.5.x, upgrading can have some benefits, such as:

  • Reactive support
  • Upgraded release trains (Hibernate, JDBC connectors, ...)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.