acaloiaro / prwatch-action Goto Github PK
View Code? Open in Web Editor NEWGithub action for monitoring pull requests on a repository
License: MIT License
Github action for monitoring pull requests on a repository
License: MIT License
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).
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.
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.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.).
As a user --
As a team --
As an org --
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 --
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.
MYPROJ-1234
anywhere in the description as a URL or plain textAUTO_REBASE: true
env var setCurrently, the transitioning of an issue's status and commenting on issues is coupled. Let's decouple these!
Fixed by: #23
See https://github.com/src-d/go-git
Support will need to be added for .gitattributes
and the union
merge driver https://github.com/src-d/go-git/blob/master/COMPATIBILITY.md
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.