Feature request(GitHub App): Specify label name to be reviewed in .env

Open Beginner friendly
#76 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
github-actions, typescript
Domain
devtools

Research direction

Start with .env.example and the label-handling logic in src/bot.ts around the linked line. Check how existing environment variables are read and run npm test if the local setup permits. Done means an optional TARGET_LABEL setting prevents review when the pull request lacks that label, while preserving current behavior when it is unset.

Written by the indexing model from the issue text.

Description

Purpose

As per Github Actions version, it would be convenient if you can specify the label name to be reviewed in GitHub App version.

Suggestion

Here's my implementation suggestion.

      const target_label = process.env.TARGET_LABEL
      if (target_label && pull_request.labels.every(label => label.name !== target_label)) {
        return "no target label attached"
      }

https://github.com/anc95/ChatGPT-CodeReview/blob/8833ed9067356702bde83caaedee0627a5ca3de4/src/bot.ts#L61

I also tried to make a PR, but npm test doesn't work for my environment. (Windows / WSL2)

Dominant language
JavaScript
Stars
4.5k
Forks
461
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anc95/ChatGPT-CodeReview

All issues in anc95/ChatGPT-CodeReview

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.