mtchavez / circleci Goto Github PK
View Code? Open in Web Editor NEWCircleCI REST API Ruby Gem
License: MIT License
CircleCI REST API Ruby Gem
License: MIT License
Version 1.1.0
introduced new object/class approach to interacting with the API. This also allows for optionally overriding the config per request or class instance.
README
on usage of gem with new approachIt seems to be "API to Create a new checkout key" is not implemented by this gem.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rake (>= 13.0.1, <= 13.0.3) was resolved to 13.0.3, which depends on
Ruby (>= 2.2)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
I'm currently using an old fork of this gem and API requests to get info on a build started failing today. I believe something changed on CircleCI's side. I fixed the problem in my fork (which I hope to stop using the fork soon). I'm adding the issue here in case it's affecting this main repo as well, since it was kind of a pain to debug.
There's a chance I'll verify this is broken in this main repo and submit a pull request if it is, but since my fork is working it's not much of a priority for me.
Getting a build via the following method started failing today:
circleci/lib/circleci/build.rb
Lines 31 to 33 in a7a2a98
It was failing with a 403 Forbidden
.
Call Build#get
.
GET requests should have a successful response code and return the expected body.
On my fork, I was able to fix the issue by making sure not to set the request body for GET requests. Previously, it was getting set to {}
.
Here's the method I changed to fix the problem:
circleci/lib/circleci/request.rb
Lines 50 to 54 in a7a2a98
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
pry-byebug (~> 3.7.0) was resolved to 3.7.0, which depends on
byebug (~> 11.0) was resolved to 11.0.1, which depends on
Ruby (>= 2.3.0)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop-performance (>= 1.5.2, <= 1.10.2) was resolved to 1.5.2, which depends on
Ruby (>= 2.3.0)
Bundler could not find compatible versions for gem "rubocop":
In snapshot (Gemfile.lock):
rubocop (= 0.79.0)
In Gemfile:
rubocop (~> 0.79.0)
rubocop-performance (>= 1.5.2, <= 1.10.2) was resolved to 1.7.1, which depends on
rubocop (>= 0.82.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
CircleCI Build Parameters are no longer being sent - looks like all that code was accidentally removed?
Neither doing CircleCi::Project.build_branch(org, repo, branch, envvar1: 'val')
OR project.build_branch(branch, envvar1: 'val')
actually sends over build parameters anymore
One or both of those should correctly send over build parameters, like they used to
I am working on an application that I need to change the API token regularly. Right now it seems the only way to configure this gem is application-wide. Is there an easier way to change the token or can I open a PR?
This should be as easy as adding this method
class CircleCi::Project
def delete_envvar(name)
CircleCi.request(conf, "#{base_path}/envvar/#{name}").delete
end
end
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop-performance (>= 1.5.2, <= 1.11.3) was resolved to 1.5.2, which depends on
Ruby (>= 2.3.0)
Bundler could not find compatible versions for gem "rubocop":
In snapshot (Gemfile.lock):
rubocop (= 0.79.0)
In Gemfile:
rubocop (~> 0.79.0)
rubocop-performance (>= 1.5.2, <= 1.11.3) was resolved to 1.7.1, which depends on
rubocop (>= 0.82.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop (>= 0.79.0, <= 1.18.4) was resolved to 0.81.0, which depends on
Ruby (>= 2.3.0)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Thanks for your awesome gem, but when I try to get recent builds by calling:
res = CircleCi::Project.recent_builds 'tinkerbox', 'uniclimb' # user and project name.
the res.body is a String instead of a Array, inside the string it's a array form. This happens to a few projects of mine, but others are ok. I don't know if this issue comes from this gem or the circleci provider? Thanks.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop-performance (>= 1.5.2, <= 1.11.4) was resolved to 1.5.2, which depends on
Ruby (>= 2.3.0)
Bundler could not find compatible versions for gem "rubocop":
In snapshot (Gemfile.lock):
rubocop (= 0.79.0)
In Gemfile:
rubocop (~> 0.79.0)
rubocop-performance (>= 1.5.2, <= 1.11.4) was resolved to 1.7.1, which depends on
rubocop (>= 0.82.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
It seems to be "API to Lists checkout keys" is not implemented by this gem.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop (>= 0.79.0, <= 1.14.0) was resolved to 0.81.0, which depends on
Ruby (>= 2.3.0)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "ruby":
In Gemfile:
ruby (~> 2.0.0.0)
pry-byebug (~> 3.6.0) was resolved to 3.6.0, which depends on
byebug (~> 10.0) was resolved to 10.0.2, which depends on
ruby (>= 2.2.0)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
You can mention @dependabot in the comments below to contact the Dependabot team.
There's an option to get recent builds, but I'd like to be able to get a lot more. Is there a way to change the conditions for what gets added to recent builds? i.e. can I get the last 100, 1000, ... , n builds?
Adds a CircleCI key to your Github User account.
Several of the GET
API endpoints allow URL params, but that's not consistently supported.
Examples:
https://circleci.com/docs/api/v1-reference/#recent-builds
https://circleci.com/docs/api/v1-reference/#recent-builds-project
https://circleci.com/docs/api/v1-reference/#recent-builds-project-branch
https://github.com/mtchavez/circleci/blob/master/lib/circleci/project.rb#L146
vs
https://github.com/mtchavez/circleci/blob/master/lib/circleci/project.rb#L136
N/A
All endpoints support params (whether the API uses them or not may not be important)
This is probably an easy fix to update methods to allow params.
Implement valid parameters for project recent builds endpoint
limit
to be set on number of builds returned – Max of 100offset
to be set for builds – Max of 100filter
to be set to get results by status – i.e. completed, successful, failedDependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
pry-byebug (~> 3.7.0) was resolved to 3.7.0, which depends on
byebug (~> 11.0) was resolved to 11.0.1, which depends on
Ruby (>= 2.3.0)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Get Checkout key
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rake (>= 13.0.1, <= 13.0.6) was resolved to 13.0.6, which depends on
Ruby (>= 2.2)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Delete checkout key.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop (>= 0.79.0, <= 1.18.3) was resolved to 0.81.0, which depends on
Ruby (>= 2.3.0)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rake (>= 13.0.1, <= 13.0.3) was resolved to 13.0.3, which depends on
Ruby (>= 2.2)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "rspec-core":
In Gemfile:
rspec (~> 3.7.0) was resolved to 3.7.0, which depends on
rspec-core (~> 3.7.0)
rspec_junit_formatter (~> 0.4.1) was resolved to 0.4.1, which depends on
rspec-core (!= 2.12.0, < 4, >= 2)
Bundler could not find compatible versions for gem "ruby":
In Gemfile:
ruby (~> 2.0.0.0)
pry-byebug (~> 3.6.0) was resolved to 3.6.0, which depends on
byebug (~> 10.0) was resolved to 10.0.2, which depends on
ruby (>= 2.2.0)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
You can mention @dependabot in the comments below to contact the Dependabot team.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop (>= 0.79.0, <= 1.16.0) was resolved to 0.81.0, which depends on
Ruby (>= 2.3.0)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop-rspec (>= 1.38.1, <= 2.3.0) was resolved to 1.38.1, which depends on
Ruby (>= 2.3.0)
Bundler could not find compatible versions for gem "rubocop":
In snapshot (Gemfile.lock):
rubocop (= 0.79.0)
In Gemfile:
rubocop (~> 0.79.0)
rubocop-rspec (>= 1.38.1, <= 2.3.0) was resolved to 1.42.0, which depends on
rubocop (>= 0.87.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop-rspec (>= 1.38.1, <= 2.3.0) was resolved to 1.38.1, which depends on
Ruby (>= 2.3.0)
Bundler could not find compatible versions for gem "rubocop":
In snapshot (Gemfile.lock):
rubocop (= 0.79.0)
In Gemfile:
rubocop (~> 0.79.0)
rubocop-rspec (>= 1.38.1, <= 2.3.0) was resolved to 1.42.0, which depends on
rubocop (>= 0.87.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Give any pertinent information such as OS, gem version, environment, API version.
Using latest version 2.0.3 with Ruby 2.3
Need method to rerun a specific workflow
Feature doesn't seem to be supported by the gem
Allow this feature
Use case, auto-deploy workflow deploys feature branches to a test server on a hourly schedule. Sometime we need to trigger this manually. Right now only way is to to use Web UI to rerun the workflow. Would love to be able to do this from custom cli. We could use curl according to https://ideas.circleci.com/ideas/CCI-I-192 but would rather use this gem.
Would like to pass workflow name as a param something like:
build = CircleCi::Build.new 'username', 'reponame', {workflow: 'auto_deploy_test'}, 'master'
build.retry
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop-performance (>= 1.5.2, <= 1.11.3) was resolved to 1.5.2, which depends on
Ruby (>= 2.3.0)
Bundler could not find compatible versions for gem "rubocop":
In snapshot (Gemfile.lock):
rubocop (= 0.79.0)
In Gemfile:
rubocop (~> 0.79.0)
rubocop-performance (>= 1.5.2, <= 1.11.3) was resolved to 1.7.1, which depends on
rubocop (>= 0.82.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop-rspec (>= 1.38.1, <= 2.3.0) was resolved to 1.38.1, which depends on
Ruby (>= 2.3.0)
Bundler could not find compatible versions for gem "rubocop":
In snapshot (Gemfile.lock):
rubocop (= 0.79.0)
In Gemfile:
rubocop (~> 0.79.0)
rubocop-rspec (>= 1.38.1, <= 2.3.0) was resolved to 1.42.0, which depends on
rubocop (>= 0.87.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rubocop (>= 0.79.0, <= 1.15.0) was resolved to 0.81.0, which depends on
Ruby (>= 2.3.0)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
It seems to be endpoint POST: /project/:username/:project/:build_num/ssh-users is not implemented in this gem.
Implement GET /recent-builds
which returns up to 100 of the most recent builds for the authenticated user.
limit
parameter to be set – max of 100offset
parameter to be set – should not exceed 100Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
pry-byebug (>= 3.7.0, <= 3.9.0) was resolved to 3.7.0, which depends on
Ruby (>= 2.3.0)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
We're using self-hosted CircleCI Enterprise on our private network, and have it running with a self-signed SSL cert (since it's internal only). Thanks to #10 I can configure the host endpoint (config.host
), but then all requests fail with a RestClient::SSLCertificateNotVerified
error.
I was able to patch this in inside a script, by converting CircleCi::Http to use RestClient::Request.execute in place of the get
and post
methods (which are just thin wrappers around execute).
module CircleCi
class Http
def create_request_args(http_verb, url, body)
if http_verb == "post"
return {
:method => :post,
:url => url,
:payload => body,
:headers => headers
}
end
{
:method => :post,
:url => url,
:headers => headers
}
end
def request(http_verb, path, body = {})
url = "#{@config.host}#{path}"
args = create_request_args http_verb, url, body
# this should come from a configuration option
args[:verify_ssl] = false
RestClient::Request.execute(args) do |res, req, raw_res|
body = res.body.to_s
body.force_encoding(Encoding::UTF_8)
code = raw_res.code.to_i
self.response = body
self.errors = []
handle_response(body, code, path)
Response.new(self, code, path)
end
end
end
end
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "ruby":
In Gemfile:
ruby (~> 2.0.0.0)
pry-byebug (~> 3.6.0) was resolved to 3.6.0, which depends on
byebug (~> 10.0) was resolved to 10.0.2, which depends on
ruby (>= 2.2.0)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
You can mention @dependabot in the comments below to contact the Dependabot team.
It seems to be "Endpoint to Create an ssh key used to access external systems that require SSH key-based authentication" is not implemented by this gem.
The documentation for using Build/Project in version 2.0 seems to point out a UX issue.
If the VCS type is optional, then it should be a named arg with a default value. This would greatly improve the UX of using this gem.
build = CircleCi::Build.new 'username', 'project', nil, '1234'
build = CircleCi::Build.new 'username', 'project', '1234'
build = CircleCi::Build.new 'username', 'project', '1234', vcs: 'github'
This is backwards incompatible change for 2.0, so this may need to be implemented in 3.0
Adds Heroku API key to CircleCI, takes apikey as form param name.
Dependabot can't resolve your Ruby dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.0.0.0)
rake (>= 13.0.1, <= 13.0.3) was resolved to 13.0.3, which depends on
Ruby (>= 2.2)
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Readme contains a description to list the vars of a project
https://github.com/mtchavez/circleci#envvar
res = CircleCi::Project.envvar 'user', 'repo'
res.success?
I needed to replace envvar
with envvars
.
Happy to send a PR but I it by design that list is envvars (plural)
and the command set/get are with envvar as endpoint.
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.