Code Monkey home page Code Monkey logo

background-check's Introduction

background-check's People

Contributors

gr2m avatar itaditya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

background-check's Issues

Increase the limit of toxic comments from 1 to 5

Currently the github app creates an issue in the discussion board as soon as it find a toxic comment of the user. Deciding hostility of user on basis of 1 comment is not correct. We should increase the toxic comments limit from 1 to 5, so we are sure that the user is actually hostile

Weekly Updates on Background Check

Hey all! 👋

I am Aditya Agarwal. A pre-final year CSE undergrad at JSSATE Noida, India.

This April, I got selected as Student Developer at Probot in Google Summer of Code. 😄
I would like to thanks @bkeepers , @gr2m , @JasonEtco , @wilhelmklopp and the awesome Probot community for giving me this opportunity.

So, this summer, my major task here is to develop a Background Check application for GitHub.

In this locked issue, I will be sharing weekly updates on my progress.

Please feel free to share any ideas, suggestions, updates, etc., by creating an issue for it or discussing about it in #contributors on Slack!

Make the app's org configurable

Currently the app's org is set to probot-background-check, but this temporary and most likely to change. After @JasonEtco @bkeepers set up a org with private repo plan, that org will be used. Other than that, developers who deploy their own instance of the app will most likely use a different org for their version of this app, so there should be a central place where they can update the org name and not jump in different files to do this

Deploy app ✓

@itaditya I got an instance of this repository deployed and the app is installed on this repository: https://github.com/apps/background-check. Any change that makes it into master will get automatically deployed.

What permissions do you need the GitHub App to have? Here's what is currently selected:

image

And here are the events that it's subscribed to:

image

add the app installer to their discussion board repo.

When the github app is installed on an account (individual or org) (referenced as appInstallerName from now) the person who installed the app (sender in payload) should be added as collaborator to {appInstallerName }-discussions repo under probot-background-check org.

add snapshot testing

currently we are using assertions only. The problem that arise is that the expected output has to be first logged to console and then copy pasted in the assertions. This can be avoided via snapshot testing. In the latter approach, jest will create a snapshot of the output and store it in files. Next time we run test jest itself cross checks the output with the snapshot and raises error if they don't match. If the change was expected we just have to call jest with -u flag to tell jest to update the snapshots with the new output.

Improve description of github app

Based on feedback from @JasonEtco , it is concluded that the description must be, well, more descriptive 😅 . The description must describe the meaning of background checking effectively.

Make the discussion repo private

Since the probot-background-check org has now the ability to create private repos, the app should switch the discussion repos to private repos only

Use nock for most tests

Currently in analyseSentiment.test.js many tests make request to Perspective API. This is taking too much time to finish and might blow the API quota limit. To solve this, use nock for most tests and in only one test send the request to the API

Less permissions?

When installing https://github.com/apps/background-check to one of my repositories, these were the permissions requested:

... permissions:

  • Read access to code
  • Read access to metadata
  • Read and write access to administration, issues, members, and pull requests

Is there no way to not need write access to all those?

Write unit tests for github-api methods

The github-api contains these methods -

createDiscussionIssue
getCommentsOnIssue
getUserCommentedIssues
getUserDiscussionIssue

Write unit tests for each of the following

build basic sentiment analyser script

Use Perspective API to run sentiment analysis on the text extracted from user comments and use the toxicity information for further actions of the bot.

[discussion] Should we use team-discussions instead of maintainers-discussion private repo?

As mentioned by @gr2m

gregor [11:56 PM]
@dev_aditya you probably discussed that already, but I wonder if there is an alternative to a private repository? I fear it will prevent a lot of open source projects that use a GitHub Organization to use it due to the cost of an upgrade for private repositories. I wonder if the app could post a message to a team chat for example :thinking_face: Not sure if an app can do that

These are all valid points. Would love to know everybody's opinions on this.

/cc @bkeepers @JasonEtco

pass sentimentAnalyserInstance to backgroundFinder rather than analyseSentiment

Currently we pass analyseSentiment util and PERSPECTIVE_API_KEY to backgroundFinder. However backgroundFinder has no direct requirement of PERSPECTIVE_API_KEY. It just uses the key to pass to analyseSentiment which returns a sentimentAnalyserInstance. This creates a lot of confusion.

It's much better to pass a sentimentAnalyserInstance to backgroundFinder

pass an authenticated github instance to github-api methods

Currently context is passed to github-api methods and then context.github is used to make requests to github. This tightly couples these api methods to the app and to probot. Instead if we just use a github parameter then we can pass any github client like octokit etc. and still use the github-api methods.

Set an upper limit for the number of comments analysed

Currently, we use getUserCommentedIssues to get 30 (due to pagination) issues as search result. Then for each issue we get 30 (again due to pagination) comments from which we filter out the user's comments. Then we run sentiment analysis on the user comments. Till we don't exhaust the toxic comments limit, the app keeps on fetching comments on issues. This must have an upper limit other wise the app will waste to much time on one user only

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.