GithubHelp home page GithubHelp logo

label-when-approved-action's People

Contributors

abinoda avatar ibrasho avatar massa142 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

label-when-approved-action's Issues

Publish docker image to docker hub

Every time a PR is approved it takes around 1 minute to build the docker image and then it runs the script. I was wondering if it makes sense to publish a prebuilt docker image to docker hub so that it doesn't need to be built it every time.

jq: error (at <stdin>:4): Cannot index string with string "state"

Same issue as this one.
#63

Oddly enough, I was able to get the value without any problems when I verified jq in another workflow.

image

However, I get a jq error when I run label-when-approved-action@master.

image

It also works fine in some repositories.
Does this result depend on the repository settings?

Conditional labelling after approval

I have an idea for further improving this action. I've been searching for an workflow that automatically labels on approval and this fits the bill nicely.
Frustratingly however the labeller will add the label on any approved PR, and I want it to be conditional perhaps based on a config file or on other labels applied to the PR.

For example I want to add a QA required label automatically, however there are some circumstances where this label is not the best label to add to an approved PR (e.g. dependency bump PRs get treated differently), so I want to be able to control when the auto action is triggered.

Could include issue #10 in this and add optional condition that approval required from all who review?

Label when *all* reviewers have approved

On our project, when an author creates a PR, they choose how many people to review their PR. It's usually 2 people, but sometimes 1, sometimes up to 6.

Rather than labelling when a fixed number have approved (eg. APPROVALS: "2"), would it be possible to label once all the current PR's reviewers have reviewed?

For example:

  • if a PR has 2 reviewers, label when both have reviewed
  • if a PR has 4 reviewers, label when all 4 have reviewed
  • if a PR has 8 reviewers, label when all 8 have reviewed

Perhaps allow something like APPROVALS: "all" in the workflow .yml, and then something like this (pseudocode):

if [[ "$APPROVALS" == "all" ]]; then
    $APPROVALS = length($reviews)
fi

and do it somewhere before this:

https://github.com/pullreminders/label-when-approved-action/blob/d8e895923241c6399899471c5eb91fc3cc717776/entrypoint.sh#L53-L55

Thank you!

n

on: pull_request_review
name: Label approved pull requests
jobs:
labelWhenApproved:
name: Label when approved
runs-on: ubuntu-latest
steps:
- name: Label when approved
uses: pullreminders/label-when-approved-action@master
env:
APPROVALS: "2"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADD_LABEL: "approved"
REMOVE_LABEL: "awaiting%20review"

Compatiblity with oncoming pull requests from forks

Does this not work with pull requests from forks? I'm getting the following error:

{
  "message": "Resource not accessible by integration",
  "documentation_url": "https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue"
}
{
  "message": "Resource not accessible by integration",
  "documentation_url": "https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue"
}

Being able to change number of required reviews based on existing labels

We want the ability to change the required number of reviews based on some existing labels.

Our usecase is like this:
We require at least 2 reviewers on each PR, but some parts of the repo are more sensitive and we want 3 reviewers on those PRs and label them with 3-reviewers, so that even though github enables merging after 2, by convention we don't merge them unless they get 3 reviews. So basically we want to be able to define different steps based on the presence of a particular label.

Would it be possible to express this in this action?

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.