Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Alexandre Paixao
@alex-pex

hey @iancrowther it seems i don't have permission to view your yml, i keep getting 404. but here is an example i created just for you https://github.com/shine2lay/MergeableTest/runs/520311716

Hi! I want to run validation on pull request, but only if not created by CI users. I want to use the or validator (which is not mentionned in the docs). I don't know how to write it

2 replies
My current config is
This message was deleted
version: 2
mergeable:
  - when: pull_request.*
    validate:
      - do: title
        must_include:
          regex: "RM2-\\d+]$"
      - do: label
        must_include:
          regex: "^Tag:"
    fail:
      - do: checks
        status: "failure"
5 replies
Jojo
@JojoM1992_twitter
hey guys
is there a way to use mergeable to validate lines of code in a file, set a maximum length in file
the size validator only looks at changes
Justin Law
@jusx
@JojoM1992_twitter There isnt currently a validator that does that but please create an issue for it. PR welcome as well. Thanks in advance.
Shitij Goyal
@masterlittle

I'm trying to run a mergeable config as a status check but all I'm getting is
Expected Waiting for status to be reported

The bot seems to be hung.

version: 2
mergeable:
  - when: pull_request.opened
    name: "Greet a contributor"
    validate: []
    pass:
      - do: comment
        payload:
          body: >
            Thanks for creating a pull request! A maintainer will review your changes shortly. Please don't be discouraged if it takes a while.
Anyway to know how long or when it will finish or is it stuck? Can't see anything in Github actions too
Shine Lee
@shine2lay
@masterlittle from your config, I only see comment as the action, if you wish checks to be created, you'll have to include check action as well https://mergeable.readthedocs.io/en/latest/actions/check.html
Muhammet Arslan
@iammuho
Hey team, isn't it possible to change default behaviour of ordering the mergable.yml file ? I've defined the rules in base branch or organization but it can be overriden by PR and its a security issue. Let's say I've defined no empty description and someone can override this
Elie Weintraub
@elieweintraub
Does the mergeable app support requesting a review to a given user based on extracting the user name from description or title or does the reviewer(s) have to be static?
Justin Law
@jusx
@elieweintraub you could apply Regex on title and/or description and based on that assign the appropriate reviewer.
Elie Weintraub
@elieweintraub
@jusx while that will work for a fixed set of reviewers (one regex action pair per reviewer), in my use case the set of reviewers is dynamic so an ideal solution would be extracting the user name from description or title via Regex capture and having the capture available to the Request Review action. This would allow a single Title/Description validator => Request Review action that would support requesting review of an arbitrary user
Justin Law
@jusx
@elieweintraub The way it is currently implemented there isnt a way to do this, though possible to add as a feature. In the past others have done something similar using a long list in the config with the OR operator. Not an ideal solution but doable if the list of reviewers is a finite number that is small enough. Might be useful to create an issue for this to be in the backlog. We can apply a generic implementation for passing regex captures from validators to actions. Would be great if you can share an example of your use case though. Curious: if you have to speficy a user in the title/desc why not use the ui to request review?
Elie Weintraub
@elieweintraub
@jusx The use case is where the description would include something like "Reviewers: user1, user2, user3, ..." on a line to itself. Being able to extract these users and request review from them would be useful because 1) it reduces the amount of interactions a user would have to have to request multiple reviewers 2) more importantly it provides a convenient way for various automation that doesn't use the UI to generate reviews and request reviewers. Case 2 is where this becomes really useful because the automation can use whatever logic to determine the desirable reviewers and it doesn't need to be burdened with the responsibly of interacting with GitHub APIs to actually ensure the reviewers are added.
Justin Law
@jusx
@elieweintraub got it. If you create a gh issue we can queue this into our backlog.
Elie Weintraub
@elieweintraub

@elieweintraub got it. If you create a gh issue we can queue this into our backlog.

Created mergeability/mergeable#473 for this

Justin Law
@jusx
@elieweintraub Thanks!
Joe Julian
@joejulian

Not sure why this regex is failing. It works on regextester.com. Anybody have some insight?
regex: '```release-note\n(.|\n)+\n```'
regex_flag: m

content

Add release note or "none":
```release-note
none
```

Joe Julian
@joejulian
Aha... found it. Looked at webhook logs. Github uses CRLF so ```release-note$(.|\r\n)+^``` works.
Justin Law
@jusx
Nice!
Mike Ferrier
@mferrier
anyone able to point me in the right direction for how to fix a Mergeable PR check that seems to be stuck? has been running for 3h, usually takes < 2s
Justin Law
@jusx
@mferrier Yes. Update the PR such that it triggers an event that your mergeable configuration is setup to listen to.
Mike Ferrier
@mferrier
@jusx thanks
Vaibhav Singal
@vsingal-p
Hi
I have deployed mergeable in my own environment
It was working fine till now. Today I upgraded the code to latest master (after a month)
and things broke
ERROR (HttpError): If you would like to help us test the Checks API during its preview period, you must specify a custom media type in the 'Accept' header. Please see the docs for full details.
    HttpError: If you would like to help us test the Checks API during its preview period, you must specify a custom media type in the 'Accept' header. Please see the docs for full details.
        at /app/node_modules/@octokit/request/dist-node/index.js:66:23
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at async sendRequestWithRetries (/app/node_modules/@octokit/auth-app/dist-node/index.js:445:12)
        at async Job.doExecute (/app/node_modules/bottleneck/light.js:405:18)
The check at the PR is stuck, and is not receiving any response
The service is returning a 202
Vaibhav Singal
@vsingal-p
any idea ^ ? (sorry for being nudgy)
Chris Blackburn
@cblackburn-ajla
Greetings all. A cursory look back into the chat history here doesn't address my simplistic question, so I apologize if it has already been discussed/answered: Is it possible to prevent merging based on an arbitrary setting? Basically what we want to do is prevent merging during "code-freeze" which is typically on a schedule, although we could easily set a variable somewhere to turn it on and off. I know there is this app, https://www.mergefreeze.com/ which would do what we want, but we also really like all the features of Mergeable and would prefer to setup some of the comprehensive rules available that are not available on the other app. Thanks for any advice.
Justin Law
@jusx
Prevention of merging is at the PR level based on configured validation against properties of the PR where as the above app is a complete code freeze.
The closest would be to by milestone and only if the PR is set to a certain milestone is it mergeable however I feel that solves a different problem than the process problem you are wanting to solve.
Chris Blackburn
@cblackburn-ajla
The milestone setting/filter does solve a different process problem but we may be able to make that work. In a different case, wondering if we are able to fork it and add a scheduling feature and/or a boolean switch? I mean technically we could do that but not sure about licensing or if you would be OK with that. Would the Mergeable team be interested in a PR to add those features?
Justin Law
@jusx
@cblackburn-ajla Mergeable is on AGPL. And yes, please feel free to open a PR if you think that others may benefit from it.
polkapolka
@polkapolka
Hi, okay. Let me know if mergeable can't do this. The context is a Python package. I want to prevent users from closing a PR if the PR does not contain a version tag that is greater than the version tag on Main. I am using semantic versioning. I have a bash script that evaluates to true or false depending on the versions provided.
polkapolka
@polkapolka
1 - can mergeable run a bash script, 2 - is there a way to get the version tag for the HeadRef and BaseRef
Muhammet Arslan
@iammuho
Hey team, can I get an approve here? mergeability/mergeable#594 with the github actions, there is a security leak and this must_exclude can fix this issue.
We have mentioned the related article in the PR
@jusx :top:
Vaishnav Nugala
@vaishnav-canarys
i am configuring mergeable with validating a pull request. is it possible to run mergeable against every commit from source branch
Chip Zoller
@chipzoller
Hey folks, just found this cool tool but wondering how to assign different labels to an issue based on a regex match on a 1-to-1 basis.
6 replies
Jerry Macedo Castro
@JerryMacedoCastro
Hello, folks. I'm getting this error: "Resource not accessible by integration". I'm trying to set up a bot to auto merge prs. I made it work on a public repo but it doesn't work on GitHub Entrerprise. I'm using my own instance of mergeable and running locally. Already set the permissions on GitGub Developer Settings. I opened this issue on github to get some help mergeability/mergeable#621. Did anyone see this error before?
Carlos Alexandre
@calexandre
Hey all, I have a question that I was not able to find anywhere in the repo: where does the mergeable free-hosted app runs on? I know that GH actions run on GitHub servers (except when you use self-hosted runners), but for GitHub Apps I was not able to find an answer...
1 reply
Janko Ulaga
@jankoulaga

Hiya... I'm trying to set up the org-wide defaults like it's defined here ...

So, i've got a .github repo in the org, it has a .github/mergeable.yml defined, yet the repo that has the app enabled continuously claims that there's No Config file found. Any hints?

ThosRTanner
@ThosRTanner
i had that. you need to make sure the .github/mergeable.yml is in your master fork, as it won't use the one in pull requests from other forks 'for security reasons' - though that does leave you open to merging changes that haven't actually been tested
question of my own: is it possible to require approval has been made by someone from a different team for different files in a repo. So that changes to files in directory A need approval from someone in team A-Approvers, and changes to files in directory B need approval from someone in team B-Approvers (because our repo is set up like that, and it's going to be hard to break it into 2)