GithubHelp home page GithubHelp logo

tianhaoz95 / approveman Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 8.0 6.15 MB

A GitHub App that automatically approve specified changes.

Home Page: https://tianhaoz.com/approveman

License: MIT License

JavaScript 0.51% TypeScript 93.62% Shell 3.89% PowerShell 0.65% Dockerfile 1.33%
automation code-quality code-review github-app project-management review review-policies

approveman's Introduction

About me ๐Ÿ‘‹

Medium Email Twitter YouTube Reddit Twitch

  • Iโ€™m currently working on ๐Ÿ’ป
  • Ask me about ๐Ÿ’ฌ
    • Mobile app development (Flutter) ๐Ÿ“ฑ
    • Reinforcement learning ๐Ÿค–
  • Fun fact โšก
    • A boba a day keeps bugs away.

Quick references ๐Ÿ“š

Organizations ๐Ÿ…

tianhaoz95 actions org avatar notebook avatar wowlink org avatar

Utilities ๐Ÿงฐ

  • Pylon ๐Ÿ’Ž ๐Ÿ’Ž ๐Ÿ’Ž : environment for my personal Windows dev machines.
  • WOW Profile: my personal wow link mapping.

approveman's People

Contributors

allcontributors[bot] avatar dependabot-preview[bot] avatar dependabot[bot] avatar scalen avatar tianhaoz95 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

approveman's Issues

Explore if GHE app actor name can be supported with get app API

You may try to use the authenticated app endpoint. It returns the configured name, id, avatar, and even the html_url and external_url, which might be interesting for status posts.
I don't now much about probot app development, so it is just a guess. As we are building the app from source, a central modifiable variable would already do the trick. Also ENV during build-time or runtime would work. As you asked for examples for our naming schemes, we prefix the apps usually with an organization name separated with -. However, I do not recommend to stick to this in your app.

Referenced from the original issue #64

[FEAT] Add capabilities to blacklist or whitelist usernames

Is your feature request related to a problem? Please describe.
In case some users are checking in shady stuff, there should be a way to control who is allowed to check in stuff at all.

Describe alternatives you've considered
Can't think of any.

Add contributor: <mohan>

@all-contributors please add <mohan> for <contributions>

Hi team, thanks for this information.
I do have a similar task in my repository we have (qa,uat, and staging). I'm trying to automate the code approval to automate to uat and staging.
Example: I have opened the feature branch pull request and got the reviews and merge code. So the same feature branch pull request is opened to merge code uat and stage, I need to add a status check to tell that the same feature branch has got approval in qa so no need for additional reviews in uat so automatically approves the review in uat and staging.

Can you please tell me how to do this we are not using "GitHub actions" but need to achieve without actions?

Pease can you give me a path forward.

[BUG] Whoops! An unknown error occured.

Describe the bug
We have approveman running on our repo. Sometimes it would report "Whoops! An unknown error occured." while checking a PR. We've been using it for the last 2 business days and it happened twice.

To Reproduce
The bug is not easily reproducible.

Expected behavior
Approveman should be able to check a PR and approve (or ignore) without failing and reporting an error.

Screenshots
Crash 1:
Screen Shot 2022-02-01 at 6 37 27 PM

Crash 2:
Screen Shot 2022-02-01 at 6 36 29 PM

Additional context
Add any other context about the problem here.

approveman does not support deviating appname

I built and installed this app on a GitHub enterprise server and prefixed the app name with our project name (as gh enterprise does not scope apps). So then the name of the app (and hence the reviewing "user") was not approveman[bot] as hard coded in the code. Thus, the app was not able to dismiss its own review.

[FEAT] Good to accept comment commands

Is your feature request related to a problem? Please describe.
It would be good to give user a way to interact with the app instead always have it passively listening. For example, if it is for some reason not re-checking the status after an update (maybe the server load peaked), users can post a checking command to prompt it to do its job.

Describe the solution you'd like
Add an infra to listen to comments.

Describe alternatives you've considered
A site to add commands or a CLI. I would say CLI might be a good idea by itself, but site it too much work TBH.

Additional context
None

Status not complete

Seems that the status only post a complete check mark if there is a rule match. Check if that is the case.

[BUG] ApproveMan not selectable as reviewer

Describe the bug
We've got a private repo (github.com/CamusEnergy/bando), for which we're trying to set up ApproveMan. I'm doing testing on my private fork with the same configuration (github.com/EnergySRE/bando), and seeing the same behavior in both places.

To Reproduce
Steps to reproduce the behavior:

  1. Install ApproveMan with org-level permissions from GitHub Marketplace
  2. Set "Repository access" to "All repositories"
  3. Create a branch with the config below*
  4. ApproveMan appears in the automated checks on the PR (screen shot below)
  5. ApproveMan does not appear as an option on the reviewer list

I also tried adding ApproveMan as an authorized user to our organization, and receive a "no such user" error.

Expected behavior
I expect to be able to select ApproveMan as a reviewer and have it approve my PR based on the content of my config.

Screenshots

Automated checks pass:

Screen Shot 2022-01-14 at 11 34 48 AM

ApproveMan not selectable as reviewer:

Screen Shot 2022-01-14 at 11 40 25 AM

Additional context

Here's the config we're using:

ownership_rules:
  directory_matching_rules:
    - name: Markdown-only changes
      path: **/*.md
    - name: Doc folder
      path: doc/*

[BUG] HTTPError: Not Found

Describe the bug
When creating a PR, the Approveman check failed (not neutral, but failed) with the following error:

HttpError: Not Found
at /app/node_modules/@octokit/request/dist-node/index.js:86:21
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async sendRequestWithRetries (/app/node_modules/@octokit/auth-app/dist-node/index.js:454:12)
at async Job.doExecute (/app/node_modules/bottleneck/light.js:405:18)

To Reproduce
Steps to reproduce the behavior:

  1. Add Approveman to your repo.
  2. Configure it with limited scope for auto-approved changes (this happened with an allow-listed user, but it isn't clear if that is related).
  3. Create a PR (with an allowed user) containing changes outside of the defined scope.
  4. See error.

Expected behavior
The Approveman check should not succeed, but should complete with a neutral status.

Screenshots
image

[FEAT] initialize a CLI infra

Is your feature request related to a problem? Please describe.
There are things about the config that users want to check before submitting anything into the repository. For example, if the configuration file is valid at all or what will it do to a certain pull request.

Describe the solution you'd like
Initialize a CLI infra that shares code with the app.

Describe alternatives you've considered
Not much

Additional context
N/A

[FEAT] maybe add a docker image to make GitHub Enterprise usage easier

Is your feature request related to a problem? Please describe.
Now users need to fork the repo and do a bunch of operations to get it running on GitHub Enterprise.

Describe the solution you'd like
Run a docker command and done.

Describe alternatives you've considered
There are many alternatives but none seems as effortless.

Additional context
Add any other context or screenshots about the feature request here.

Add documentation for enterprise usage

It was recently brought to my attention that enterprise GitHub is drastically different from the GitHub in terms of apps, so a dedicated documentation for enterprise server usage can be helpful.

Add optional config to customize approving messages

It would be a good indicator for the new contributors to see useful information about how ApproveMan is doing right from the pull request comments.

A quick draft design:

ownership_rules:
  message:
    success: |
      "Thanks {{username}} for opening the request!"
  directory_matching_rules:
    - name: personal projects in experimental
      path: playground/{{username}}/**/*
    - name: personal documentation
      path: docs/personal/{{username}}/**/*
      message:
      success: |
        "Thanks {{username}} for opening the request!"

The message can be global or fine grained to be project specific.

We can make it into 2 steps where the first one is global only and the second one is supporting project specific message.

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.