Giter VIP home page Giter VIP logo

prwatch-action's Issues

Add support for custom merge drivers

Github does not support the use of custom merge drivers via .gitattributes. As a result, if custom merge drivers are specified for files in a project, then Github's CONFLICTING merge state can be inaccurate.

A solution to this problem is performing a merge attempt using a client that supports custom merge drivers via .gitattributes. One such client is https://github.com/libgit2/libgit2, which has go bindings https://github.com/libgit2/git2go.

Alternatively, we can shell out to a git binary on the system and attempt a merge using the CLI.

The end result should be a new IsConflicting that first checks whether a branch is CONFLICTING relative to its base, and subsequently checks whether the branch can be merged with its base by performing a merge (which is capable of using custom merge drivers).

Add support for Github "checks"

  • Perform some operations when a pull request has failed checks
  • Consider what is a reasonable interface for expressing "operations"

Add dual-pass mode to better support event-based triggering

One of the current limitations of this Action is that it must be run on a schedule since it is impossible for Github to determine the mergability of pull requests against the branch on which the action is being triggered.

For example if the Action is configured as follows

---
'on':
  push:
    branches:
      - master

... 

then the mergability of any pull requests against master is not possible for Github to determine.

The problem is that running this action on a schedule can waste valuable Github-hosted Actions minutes. There are two approaches that would allow this Action to be run event-based rather than on a schedule.

  1. Currently, the only Pull Requests placed under consideration by this action are those that are OPEN and have a Mergeable status of CONFLICTING. Instead of considering Github's Mergeable status at all, this action could rely on its own TryMerge functionality and ignore Github's mergeable state. The CONFLICTING check was how this Action originally worked, but #3 adds TryMerge support that, in some ways, deprecates Github's mergeable state check.
  2. A two-phase approach where the first pass of pulling down OPEN pull requests will return a list of pull requests with unknown mergeable state; wait some amount of time (30s?), and then pull down the OPEN pull requests list a second time and they should have an updated mergeable state.

I'm leaning toward (1.).

Add support for Github Projects/Issues

  • Add support for Github projects
  • When a new pull request is opened, add the PR to a Project
  • Similar to Jira functionality, transition cards to new status when the underlying pull request of an issue goes into a conflict state.

Support a user/team/global configuration

As a user --

  • I want commenting enabled, but not status transitions

As a team --

  • I want to be able to control all settings for every member of the team

As an org --

  • I want to control everything for everyone

Global permissions supercede team-level permissions, and team-level permissions supercede user-level permissions.

Teams/users refer to Github users and teams.

For team settings --

  • On boot, pull all members of team so PR authors' membership can be checked against team user lists.

This should be done through a new configuration YAML file.

settings:
  issue_transitions: 
    enabled: true 
  issue_comments:
    enabled: true
teams:
  - name: team 1
    settings:
      issue_transitions:
        enabled: false 
      issue_comments: 
        enabled: false
users:
  - user: acaloiaro
     settings:
       issue_transitions:
         enabled: false
       issue_comments: 
         enabled: true

Team-level permissions are a nice-to-have. Initially build out global and user-level perms.

Improve README.md

  • Document that only Jira projects are supported (for now)
  • Document how Pull Requests require a project key, e.g. MYPROJ-1234 anywhere in the description as a URL or plain text

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.