reports-check-action

Bug Reports (GitHub Issues) Quality Checker

https://github.com/tracehubpm/reports-check-action

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary

Keywords

actions bug-reports chatgpt deepinfra phind quality-control social-coding
Last synced: 6 months ago · JSON representation ·

Repository

Bug Reports (GitHub Issues) Quality Checker

Basic Info
  • Host: GitHub
  • Owner: tracehubpm
  • License: mit
  • Language: TypeScript
  • Default Branch: master
  • Homepage:
  • Size: 966 KB
Statistics
  • Stars: 10
  • Watchers: 2
  • Forks: 1
  • Open Issues: 19
  • Releases: 16
Topics
actions bug-reports chatgpt deepinfra phind quality-control social-coding
Created almost 2 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

reports-check-action

EO principles respected here DevOps By Rultor.com We recommend IntelliJ IDEA

node codecov release Hits-of-Code License

Bug Reports (GitHub Issues) Quality Checker.

Motivation. The quality of bug reports is paramount for the overall quality of a software project: poorly formulated bug reports often lead to wasted time, programmers frustration, and delays. This repository is a Github Action that would trigger on every new issue submitted, check that issue for quality problems, and report them in the issue as a comment, asking bug reporter to fix the report.

How to use

Consider this configuration:

yml name: reports-check on: issues: types: opened permissions: issues: write contents: read jobs: check: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: tracehubpm/reports-check-action@latest with: openai_token: ${{ secrets.OPENAI_TOKEN }} github_token: ${{ secrets.GH_TOKEN }}

Configurations

Quality checker can be configured the way you want. These are the parameters you can use/override:

  • openai_token: Open AI API key, you can obtain it here.
  • github_token: GitHub token to post messages in the issue's comments.
  • openai_model: Open AI ChatGPT model, the default one is gpt-4.
  • deepinfra_token: Deep Infra API key, you can obtain it here.
  • deepinfra_model: Deep Infra API model, the default one is Phind/Phind-CodeLlama-34B-v2, check out all available models.
  • exclude: Issue titles to exclude from checking.

Issues to ignore

You can configure this action to ignore some incoming issues. To do so, you can use exclude and pass to it an array of regular expressions. Consider this configuration:

yml name: reports-check on: issues: types: opened permissions: issues: write contents: read jobs: check: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: tracehubpm/reports-check-action@latest with: openai_token: ${{ secrets.OPENAI_TOKEN }} github_token: ${{ secrets.GH_TOKEN }} exclude: '["^I have a question*.+$", "^I want to request new feature*.+$"]'

In this case we are preventing all issues with titles I have a question... and I want to request new feature... to be analyzed by the reports checker.

Analysis Method

Our analysis method consists of a series intermediate steps. Once reports-check-action receives new GitHub issue, the following happens:

chain.svg

Each goal is represented as separate prompt to the LLM. Thus, we utilize famous pattern called Chain-Of-Thought.

Analysis

Firstly, we run simple analysis against submitted bug report. Output looks like this:

```text Quality problems related to this bug report formulation:

  • The title of the bug report "deltaBidning" and "lambdaBidning" Typos in Phi.g4 grammar file is not clear and descriptive enough. A better title could be "Incorrect naming in Phi.g4 grammar file".
  • The bug report lacks a clear problem statement. It's suggested to start the description with a clear problem statement instead of an action. For example: "In the Phi.g4 grammar file, there are two typos in the following code block. Instead of 'deltaBidning' and 'lambdaBidning', it should be 'deltaBinding' and 'lambdaBinding'."
  • The bug report lacks information about the impact of these typos on the software's functionality. For example, it would be helpful to know if the issue prevents compilation, causes runtime errors, or leads to unexpected behavior. Additionally, a severity label for the issue could be useful. ```

Self Validation

LLM validates previous analysis result and corrects it if needed:

text The title of the bug report "deltaBidning" and "lambdaBidning" Typos in Phi.g4 grammar file is not clear and descriptive enough. A better title could be "Incorrect naming in Phi.g4 grammar file". The bug report lacks information about the impact of these typos on the software's functionality. For example, it would be helpful to know if the issue prevents compilation, causes runtime errors, or leads to unexpected behavior. Additionally, a severity label for the issue could be useful.

We utilize pattern so-called Self Validation that aims to help a bit with hallucinations and stochasticity as this paper suggests. After self validation proceeded, we pack it into Markdown format using Markdown Packing Method:

markdown * The title of the bug report "deltaBidning" and "lambdaBidning" Typos in Phi.g4 grammar file is not clear and descriptive enough. A better title could be "Incorrect naming in Phi.g4 grammar file". * The bug report lacks information about the impact of these typos on the software's functionality. For example, it would be helpful to know if the issue prevents compilation, causes runtime errors, or leads to unexpected behavior. Additionally, a severity label for the issue could be useful.

Cap Top 3

Some analysis results contains many problems. Consider this example:

markdown 1. Lack of a clear description: The report lacks a clear and concise description of the problem. It simply states there are typos but does not specify what the typos are or how they impact the system. 2. Missing steps to reproduce: There are no steps provided to reproduce the issue. This makes it difficult for developers to identify if they have fixed the issue correctly. 3. No severity level: The severity level of the issue is not stated. This is important information for developers to prioritize how soon the issue should be resolved. 4. Lack of environment details: The report does not mention which environment this issue occurs in (e.g., which version of the software, which operating system). 5. Use of shorthand: The term 'take a look here' is used, which is not clear or professional. It is best to avoid using shorthand or colloquial language in formal documentation. 6. Incomplete code block: The code block is not complete (it is cut off after the relevant lines). This makes it difficult for developers to understand the context of the issue.

In order to make programmers not ignore the feedback reports by this action, we minimize amount of problems to just 3 or less. LLM at this stage picks the most important problems from previous analysis and adds them into new response:

markdown 1. Lack of a clear description: The report lacks a clear and concise description of the problem. It simply states there are typos but does not specify what the typos are or how they impact the system. 2. Missing steps to reproduce: There are no steps provided to reproduce the issue. This makes it difficult for developers to identify if they have fixed the issue correctly. 6. Incomplete code block: The code block is not complete (it is cut off after the relevant lines). This makes it difficult for developers to understand the context of the issue.

Polish

Here we polish the response we got before. In this goal we fix formatting issues and improve standardization of the response by making it "solid":

markdown * Lack of a clear description: The report lacks a clear and concise description of the problem. It simply states there are typos but does not specify what the typos are or how they impact the system. * Missing steps to reproduce: There are no steps provided to reproduce the issue. This makes it difficult for developers to identify if they have fixed the issue correctly. * Incomplete code block: The code block is not complete (it is cut off after the relevant lines). This makes it difficult for developers to understand the context of the issue.

Suggestions

At suggestions we generate actual suggestions on how to improve bug report formulation. At this point we don't ask LLM to use strict formatting, in most cases it is just a free of format text:

```text Suggested improvements:

Clear description: Please provide a clear explanation of the issue. Explain what typos were found in the code (deltaBidning and lambdaBidning) and how they impact the system functionality.

Steps to reproduce: Include the necessary steps to reproduce the issue. This will help the developers understand the issue better and identify if the fix was correct.

Complete code block: Kindly provide the complete code block for better context understanding.

Suggested Bug Report:

deltaBidning and lambdaBidning Typos in Phi.g4 grammar file: In our Phi.g4 grammar file, we have identified typos in the following lines:

binding : alphaBinding | emptyBinding | deltaBidning | lambdaBidning ; The correct syntax should be:

binding : alphaBinding | emptyBinding | deltaBinding | lambdaBinding ; The typos(deltaBidning and lambdaBidning) impact the system's syntax understanding and cause unexpected behavior or errors.

To reproduce this issue, follow these steps:

Open the Phi.g4 grammar file. Locate the lines marked above. Observe that deltaBidning should be deltaBinding and lambdaBidning should be lambdaBinding. These corrections will solve the issue and appropriately define the grammar rules for binding. ```

Next step we do is splitting this text into logical chunks and format them into JSON object:

markdown * Clear description: Please provide a clear explanation of the issue. Explain what typos were found in the code (deltaBidning and lambdaBidning) and how they impact the system functionality. * Steps to reproduce: Include the necessary steps to reproduce the issue. This will help the developers understand the issue better and identify if the fix was correct. * Complete code block: Kindly provide the complete code block for better context understanding. * Suggested Bug Report:deltaBidning and lambdaBidning Typos in Phi.g4 grammar file: In our Phi.g4 grammar file, we have identified typos in the following lines:\n\n\nbinding\n : alphaBinding\n | emptyBinding\n | deltaBidning\n | lambdaBidning\n ;\n\nThe correct syntax should be:\n\n\nbinding\n : alphaBinding\n | emptyBinding\n | deltaBinding\n | lambdaBinding\n ;\n\nThe typos(deltaBidning and lambdaBidning) impact the system's syntax understanding and cause unexpected behavior or errors.\n\nTo reproduce this issue, follow these steps:\n\n- Open the Phi.g4 grammar file.\n- Locate the lines marked above.\n- Observe that deltaBidning should be deltaBinding and lambdaBidning should be lambdaBinding.\n\nThese corrections will solve the issue and appropriately define the grammar rules for binding.

In the UML notation, the full process looks like this:

method.svg

Markdown Packing Method

LLMs often produce suboptimal results when directly prompted to output in some strict user format. That's why we let LLM "think" in English and ask to summarize Markdown array only at the final step of the operation. At this stage we pack previous LLM response to Markdown array format.

Sometime before we got to this solution, we used to utilize one prompt, where we describe all the details and format that we expect LLM to give us.

Puzzle (PDD) Analysis

This action supports analysis not only for issues created manually, but also for puzzles, a.k.a todo in your code. Puzzle Driven Development (2010), 12/840,306 was suggested as a novel way for managing issues in software development. Read how it works:

Issue is treated as puzzle if it satisfies the following regex:

regexp The puzzle `(.+)` from #(\d+) has to be resolved:.+

Then we parse the issue to find a tree path where puzzle is hidden.

This one

text https://github.com/tracehubpm/tracehub/blob/8d2aca048e33a5c9d83a49af4246c9ad7fde9998/src/main/java/SnippetTestCase.java#L61-L66

Turns into 3 elements:

  • file path (src/main/java/SnippetTestCase.java)
  • SnippetTestCase.java source code
  • puzzle, located in range of 61 and 66 lines

After all of this done, we provide it to LLM and ask for quality problems.

How to contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full build:

bash npm install npm run gha

Owner

  • Name: Tracehub
  • Login: tracehubpm
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Bialiauski"
  given-names: "Aliaksei"
  orcid: "https://orcid.org/0009-0007-1155-2571"
title: "Bug Reports (GitHub Issues) Quality Checker"
version: 0.0.1
date-released: 2024-03-07
url: "https://github.com/tracehubpm/reports-check-action"

GitHub Events

Total
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 147
  • Pull request event: 2
  • Create event: 1
Last Year
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 147
  • Pull request event: 2
  • Create event: 1

Dependencies

.github/workflows/node.yml actions
  • actions/checkout v4 composite
  • actions/setup-node v4 composite
  • actions/upload-artifact v3 composite
.github/workflows/pdd.yml actions
  • actions/checkout v4 composite
  • volodya-lombrozo/pdd-action master composite
action.yml actions
  • lib/main.js node20 javascript
package-lock.json npm
  • @vercel/ncc 0.36.1 development
  • prettier 2.8.8 development
  • @actions/core 1.10.1
  • @actions/http-client 2.2.1
  • @cspotcode/source-map-support 0.8.1
  • @fastify/busboy 2.1.1
  • @jridgewell/resolve-uri 3.1.2
  • @jridgewell/sourcemap-codec 1.4.15
  • @jridgewell/trace-mapping 0.3.9
  • @octokit/auth-token 3.0.4
  • @octokit/core 4.2.4
  • @octokit/endpoint 7.0.6
  • @octokit/graphql 5.0.6
  • @octokit/openapi-types 18.1.1
  • @octokit/plugin-paginate-rest 6.1.2
  • @octokit/plugin-request-log 1.0.4
  • @octokit/plugin-rest-endpoint-methods 7.2.3
  • @octokit/request 6.2.8
  • @octokit/request-error 3.0.3
  • @octokit/rest 19.0.13
  • @octokit/tsconfig 1.0.2
  • @octokit/types 10.0.0
  • @octokit/types 9.3.2
  • @tsconfig/node10 1.0.9
  • @tsconfig/node12 1.0.11
  • @tsconfig/node14 1.0.3
  • @tsconfig/node16 1.0.4
  • @types/node 18.19.22
  • @types/node-fetch 2.6.11
  • abort-controller 3.0.0
  • acorn 8.11.3
  • acorn-walk 8.3.2
  • agentkeepalive 4.5.0
  • arg 4.1.3
  • asynckit 0.4.0
  • base-64 0.1.0
  • before-after-hook 2.2.3
  • charenc 0.0.2
  • combined-stream 1.0.8
  • create-require 1.1.1
  • crypt 0.0.2
  • delayed-stream 1.0.0
  • deprecation 2.3.1
  • diff 4.0.2
  • digest-fetch 1.3.0
  • event-target-shim 5.0.1
  • form-data 4.0.0
  • form-data-encoder 1.7.2
  • formdata-node 4.4.1
  • humanize-ms 1.2.1
  • is-buffer 1.1.6
  • is-plain-object 5.0.0
  • make-error 1.3.6
  • md5 2.3.0
  • mime-db 1.52.0
  • mime-types 2.1.35
  • ms 2.1.3
  • node-domexception 1.0.0
  • node-fetch 2.7.0
  • once 1.4.0
  • openai 4.28.4
  • tr46 0.0.3
  • ts-node 10.9.2
  • tunnel 0.0.6
  • typescript 5.4.2
  • undici 5.28.3
  • undici-types 5.26.5
  • universal-user-agent 6.0.1
  • uuid 8.3.2
  • v8-compile-cache-lib 3.0.1
  • web-streams-polyfill 4.0.0-beta.3
  • web-streams-polyfill 3.3.3
  • webidl-conversions 3.0.1
  • whatwg-url 5.0.0
  • wrappy 1.0.2
  • yn 3.1.1
package.json npm
  • @types/node ^18.15.5 development
  • @vercel/ncc ^0.36.1 development
  • prettier ^2.8.6 development
  • typescript ^5.0.2 development
  • @actions/core ^1.10.0
  • @octokit/rest ^19.0.7
  • openai ^4.20.1
  • ts-node ^10.9.1
.github/workflows/reports-check.yml actions
  • actions/checkout v4 composite
  • tracehubpm/reports-check-action master composite
Dockerfile docker
  • node 20-alpine build