I use bors for managing PRs on a few projects, and it always commits to one of the following branches:
masterstagingtryingSo, in an attempt to get it to use compute credits, I tried adding this to my .cirrus.yml:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' || $CIRRUS_BRANCH == 'master' || $CIRRUS_BRANCH == 'staging' || $CIRRUS_BRANCH == 'trying'
However, after adding that, it looks like it's still not using compute credits on the trying branch: https://cirrus-ci.com/task/6014639585361920
Any ideas what's up with this and/or how do accomplish what I'm trying to do?
I think that the or statement is only checking that ONE of the passed args is true.
It should be checking that any of them are true, which is what I want. But it doesn't use compute credits when something is pushed to the trying branch, for some reason.
I don't see you had any credits on the account at the moment of the build creation. There is a default of 60 credits for Organizations but not for personal accounts though. 馃様
That would be why.
This time I explicitly confirmed I have compute credits on my account:

Then re-triggered a build: https://cirrus-ci.com/task/5149688404115456
Is it trying to use credits for bors, not myself, or something like that?
That would most likely be why, I think it uses the primary contributor's credits
Oh! I've just found the issue. Boolean evaluator confuses about literals containing in since there is an in operator. Took quite a while to find it out. Working on a fix. 馃憤
Parser should be fixed now but you'll need to re-push. 馃様
@fkorotkov that is such a wonderfully obscure bug haha
Haha, yeah. The tricky part was that the evaluator is based on a project on sourceforge where it's hard to contribute. So I had to come up with somewhat elegant hack to make it work. 馃槄
hmm. It's still not working when bors pushes to trying.
This is the PR: https://github.com/duckinator/inq/pull/278
This is part of the build from running bors try in that PR, which makes the bot make a new merge commit and push to the trying branch: https://cirrus-ci.com/task/5081274606682112
Do you have a way to determine what account's credits it would have tried to use on https://cirrus-ci.com/task/5081274606682112 ?
If it was in fact trying to use bors, I can look into setting up my own instance and giving it some compute credits or something. If it was trying to use mine, it seems like there's another lingering problem.
Hey @duckinator,
It should be using owner's credits, so bors should be able to use your credits. 馃I've added some logs and add some credits to your account for troubles, could you please try the bors again and I'll check the logs?
@fkorotkov Thanks for the help trying to figure this out. I started a new build here: https://cirrus-ci.com/build/5128906198220800
@duckinator seems there is an issue because bors is a GitHub App and not a user. The fix that I deployed previously worked though. I'll investigate further. Thanks for checking!
Seems GitHub API endpoints doesn't support GitHub APP usernames. I've contacted GitHub folks about it. Will see what they'll answer.
Created a separate issue to track bots usage: #284
Most helpful comment
Created a separate issue to track bots usage: #284