Skip to content

SE Principle: Catch Non PR commits and flag them against the contributors of the analyzed repositories #1573

@FH-30

Description

@FH-30

What feature(s) would you like to see in RepoSense?

Allow for RepoSense to catch commits that didn't go through a pull request. Idea originated from the PR I worked on for phase 2 of IWM and the fact that such commits do not adhere to good software engineering principles.

Is the feature request related to a problem?

N.A.

If possible, describe the solution

In the PR I made for Phase 2 here, I implemented it by querying from a URL (repository URL + "/branch_commits/" + the commit hash) that Github itself utilizes to check whether a certain commit is linked to a PR (I found it through playing around in the developer tools). However, I feel this solution might not work if Github makes any changes to how they query from their API. I also did not test this solution on a large scale and I am not sure whether large amounts of requests concurrently from a certain IP address will make Github block access to that API (A Denial of Service prevention measure).

If applicable, describe alternatives you've considered

There are two alternatives I have came across:

  • We can use the official Github API here.

  • An NPM package called Oktokit/rest that provides an api call for this here. However, I am not sure if a Java Backend can work with this package.

I have yet to check if these two solutions require a certain workflow (ex: OAUTH) to access the APIs. They might also have rate limits (therefore requiring to subscribe).

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions