Heroku new API for Release doesn't have commit hash - api

The question is about the new heroku API structure:
"Accept":"application/vnd.heroku+json; version=3"
If I asked for the release data I get that one:
{
"app":{"id":"b3d70761-ee7f-4039-91ac-402d2f9d12b6","name":"some-name"},
"created_at":"2015-03-22T07:33:18Z",
"description":"Set COMMIT_HASH config vars",
"id":"610f896a-3f34-44af-b39a-43070f02891f",
"slug":{"id":"2e8e024d-4ffa-44ff-8da9-5accd3874a5e"},"updated_at":"2015-03-22T07:33:18Z",
"user":{"email":"tmp#mail.com","id":"7d46e391-63ca-4b19-b4e4-96fec8487f77"},
"version":507
}
The only problem here is that there is no
git commit hash , which does exist in the old
structure. Which looks like that:
"addons": [
"newrelic:stark",
"rediscloud:100",
"redistogo:nano",
"deployhooks:http"
],
"commit": "9a627af", <<===
"created_at": "2015/03/18 11:52:58 -0700",
"descr": "Deploy 9a627af",
"env": {
},
"name": "v461",
"pstable": {
"web": "java -Dkeyvalue.datasource=redis $JAVA_OPTS -jar build/libs/some.jar --server.port=$PORT"
},
"user": "tmp#tmp.com"
So for now I have to use both structures
and eventually 2 versions of the same api:
Any ideas for any alternative ?
Thanks in advance
Roman

I believe the API now returns a Slug for a Release, and you can look up that Slug for the commit.
https://devcenter.heroku.com/articles/platform-api-reference#slug

Related

How can i custom config CHANGELOG.md using standard-version npm package?

I'm using the command standard-version each time I want to publish new version, but the yielded changes in the CHANGELOG.md look like this:
### [10.1.9](https://github.com/my-project-name/compare/v10.1.8...v10.1.9) (2021-03-29)
### [10.1.8](https://github.com/my-project-name/compare/v10.1.7...v10.1.8) (2021-03-29)
### [10.1.7](https://github.com/my-project-name/compare/v10.1.6...v10.1.7) (2021-03-29)
first the links do not work - the github url is not correct and i want to configure it to the right url, and second, I'd like to configure the link that's shown in the changeslog file (there are some types)
I tried to use this documentation but didn't find anything that can help me
https://github.com/conventional-changelog/conventional-changelog
so how do I configure the way standard-version works on the CHANGELOG.md ? can someone provide example?
yes.
according to doc:
You can configure standard-version either by:
Placing a standard-version stanza in your package.json (assuming your project is JavaScript).
Creating a .versionrc, .versionrc.json or .versionrc.js.
If you are using a .versionrc.js your default export must be a configuration object, or a function returning a configuration object.
Any of the command line parameters accepted by standard-version can instead be provided via configuration.
Please refer to the conventional-changelog-config-spec for details on available configuration options.
example:
.versionrc
{
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"hidden": true
},
{
"type": "docs",
"hidden": true
},
{
"type": "style",
"hidden": true
},
{
"type": "refactor",
"section": "Refactor"
},
{
"type": "perf",
"section": "Performance"
},
{
"type": "test",
"hidden": true
}
]
}

Azure FHIR search for resources with _include

I have a DiagnosticReport resouce that has an encounter and 3 observation resources references. I am trying to do a search query that would return a Bundle with the DiagnosticReport and all referenced resources so as to not have to do 4 other queries.
"encounter": {
"reference": "Encounter/8720d7d7-68cc-3575-8c79-9de39561324c"
},
"effectivePeriod": {
"start": "2020-07-01T08:16:00.000Z",
"end": "2020-07-01T08:16:00.000Z"
},
"issued": "2020-07-01T08:17:03+00:00",
"result": [
{
"reference": "Observation/89510c61-8a94-3c65-8832-3397d2a70bfd"
},
{
"reference": "Observation/3d837dbf-3d4c-3742-9b6e-2638d26d8c54"
},
{
"reference": "Observation/618ec246-2d98-3179-a0a2-a0094046f466"
}
]
I have tried
[Base]/DiagnosticReport/{id}?_include=DiagnosticReport:Encounter
[Base]/DiagnosticReport/{id}?_include=DiagnosticReport:Encounter/{id}
Is there a way to get the DiagnosticReport & Encoutner & Observation in one Bundle?
This is an SQL OSS FHIR Server, so according to Documentation _include is supported in the SQL Version of azure.
You need to use the search parameters when you specify the includes, so in your case:
https://fhir-server-url/DiagnosticReport?_id=1234&_include=DiagnosticReport:encounter&_include=DiagnosticReport:result
Will return the Encounter and the Observation resources in the bundle.
I'm using FHIR API Service also. I ran across this issue for Encounter and this worked for me.
https://lcavantage.azurehealthcareapis.com/Encounter?_id=f1c06cc6-be9c-e673-408e-e6e303d9924a&_include=Encounter:subject
I believe this works now because COSMOS DB has had a few updates this question was presented and handles relationships better!

Query TFS to show all releases and whether or not it is set for approval. V 2017.3

I need to run a query in sql that will show all the TFS releases from all projects and whether or not it is setup for pre relase approvals. I see in the defaultcollection db there is the Release.tbl_ReleaseDefinition table, it has a lot of data but not approval info. I do see the Release.tbl_DefinitionEnvironment and I see ApprovalOptions there, but that seems to be showing the approval info for every release created whereas I am needing info on release definitions only.
Just as Daniel pointed out, we highly not recommend you dig into TFS databased directly.
According to your description, you just need the approval info for all release definitions. Suggest you use Rest API to handle this.
For a single release, you could use below Rest API:
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions/{definitionId}?api-version=5.1
It will return both preDeployApprovals and postDeployApprovals, for example:
"preDeployApprovals": {
"approvals": [
{
"rank": 1,
"isAutomated": false,
"isNotificationOn": false,
"approver": {
"displayName": "Chuck Reinhart",
"url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/aeb95c63-4fac-4948-84ce-711b0a9dda97",
"_links": {
"avatar": {
"href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/aad.YjYxMjE5ZWQtODEwYS03OTU3LWJjYzAtMjQ0YTI5ZDk0ZjFl"
}
},
"id": "aeb95c63-4fac-4948-84ce-711b0a9dda97",
"uniqueName": "fabfiber#outlook.com",
"imageUrl": "https://dev.azure.com/fabrikam/_api/_common/identityImage?id=aeb95c63-4fac-4948-84ce-711b0a9dda97",
"descriptor": "aad.YjYxMjE5ZWQtODEwYS03OTU3LWJjYzAtMjQ0YTI5ZDk0ZjFl"
},
"id": 118
}
],
More details please take a look at official doc here: Definitions - Get
For multiple release, you should use list: Definitions - List
Hope this helps.

RequireJS script error when requiring "ReleaseaManagement/Core/RestClient" on TFS 2015 and 2017

I'm creating an tfs hub Extension (2015/2017) and need to read the projects' release defs and create releases also. I know, I could make direkt Rest Calls instead of using the methods of the rest clients. But they seem more comfortable to me.
When I try to get the Restmanagement RestClient, I get:
Script error for: ReleaseManagement/Core/RestClient
http://requirejs.org/docs/errors.html#scripterror
In both TFS.2015.2 and TFS.2017
Doesn't the client yet exist on-premise?
You can refer to this article for how to use Rest API in extension to read a release definition: Writing a ReleaseManagement extension for cloning an existing release definition.
The code to read a release definition:
VSS.require(["VSS/Controls", "VSS/Service", "ReleaseManagement/Core/RestClient"],
var rmClient = VSS_Service.getCollectionClient(RM_WebApi.ReleaseHttpClient);
rmClient.getReleaseDefinition(vsoContext.project.id,sourceItemContext.definition.id);
And if you are using typescript, you need to include "ms.vss-releaseManagement-web.release-service-data-external" in the contribution like following:
"contributions": [
{
"id": "release-status",
"type": "ms.vss-web.hub",
"includes": [ "ms.vss-releaseManagement-web.release-service-data-external" ],
"description": "A hub to show release status",
"targets": [
"ms.vss-work-web.work-hub-group"
],
"properties": {
"name": "hello",
"order": 99,
"uri": "app.html"
}
}
]

List of all environment variables for a Pod

I have a web app on OpenShift v3 (all-in-One), using the Wildfly Builder Image. In addition, I created a service named xyz, to point to an external host+IP. Something like this:
"kind": "Service",
"apiVersion": "v1",
"metadata": { "name": "xyz" },
"spec": {
"ports": [
{ "port": 61616,
"protocol": "TCP",
"targetPort": 61616
}
],
"selector": {}
}
I also have an endpoint, pointing externally, but that is not relevant for this question.
When deployed, my program can access an environment variable named XYZ_PORT=tcp://172.30.192.186:61616
However, I cannot figure out how to see all the values of all such variables either via the web-console, or using the CLI. Using the web-console, I cannot see it being injected into the YAML.
I tried some of the oc env options, but none seem to list what I want.
Let's say you are deploying kitchensink, then the below CLI should list all the environment variables:
oc env bc/kitchensink --list