For now I can able to create CodeSpace using option available in GitHub UI as shown in the below screenshot.
Create CodeSpace Option
Is there any option to automate the CodeSpace creation flow like CLI (or) API, from which I can create CodeSpace?
You can create Codespaces via both the CLI and API:
https://cli.github.com/manual/gh_codespace_create
https://docs.github.com/en/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user
Related
I have everyting automated with CloudBuild and additionally I'd like to create a GitHub release using the CloudBuild. In short, I prepare binary files and then I want to create a GitHub release using those files.
I cannot find any working example. What should the appropriate step look like?
Additionally, I'm not sure about the authentication between GitHub <-> CloudBuild.
You can refer to the Documentation (click GitHub cli tab) where
how to create a release using CLI is explained stepwise.
There is also a separated command Doc for how to add files to
the release.
To use Github Cli in cloud build , the best Practice would be to use
community builder , for more information how to use it you can refer
to the Documentation where Readme contains a more detailed
view.
For more information, you can visit to the Public Documentation where it is mentioned as :
This page explains how to use community-contributed builders and
custom builders in Cloud Build. The Cloud Build developer community
provides open-source builders that you can use to execute your
tasks. If the task you want to perform requires capabilities that are
not provided by an existing image, you can build your own custom image
and use it in a build step. To learn about the different types of
builders, see Cloud Builders.
I was trying to have a full change from the commit to the pull-request/review process in a Azure DevOps repo with Visual Studio Code.
All good till the point where I have to create a Pull Request.
I didn't find an embedded way to do it.
There is a plugin Pull Requests for Azure Devops but it seems to be not maintained anymore.
Do you know any other good way to do it? Or may be Microsoft can invest in this important feature?
In our team, we started using the Azure CLI but found it too verbose to be practical. We also wanted to have a similar API to the GitHub CLI.
To fix this, we developed doing-cli, which is essentially a wrapper around the Azure CLI with a feel of the GitHub CLI.
A typical workflow for us is:
doing list to see open work items
doing issue create <issue title> to create a new work item
doing pr create <issue number> to create a branch and a PR based on an existing work item
Our company requires that all PRs are linked to a work item. But sometimes you want to fix things quickly, without having to always create a new work item, create a new branch, link them and open a PR. So we implemented doing workon <title> which will do all these steps for you, as well as checkout the newly created branch.
There used to be an extension, but it got pulled.
When you install the azure cli and the devops extension and then create a pull request from the terminal:
az extension add --name azure-devops
az devops configure --defaults organization=https://dev.azure.com/contoso project=ContosoWebApp
az devops pr create --repository MyRepo --open --source-branch branch-name
That last command needs 2 parameters that can be teased out of the context in a repo folder, that way you can easily alias this to a generic command.
Very few people were uring the Azure Repos and PR for Azure DevOps extensions. And most of Microsoft's investments are in GitHub.
As suggested by Jessehouwing's answer, you can create pull requests using Azure CLI.
In addition, you can also use the REST API Pull Requests - Create:
POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests?api-version=6.0
Here is an example of the request body:
{
"sourceRefName": "refs/heads/npaulk/my_work",
"targetRefName": "refs/heads/new_feature",
"title": "A new feature",
"description": "Adding a new feature"
}
My goal is to publish a extension in vscode marketplace without manually interact. Can someone make me aware, whether I can use extension API for this or there is another way using curl option?
You can use the vsce CLI. With this you can publish and update an extension from command line. Therefore you should be capable to automate that process in a CI/CD pipeline. There is also an article in the docs that explains how to use the tool.
Optionally, you can take a look to one of my extensions. There I automatically create releases using azure pipelines.
I am trying to create Sagemaker notebook instance using cloudformation template. Just wanted to see if there is any way i can associate codecommit repo to that note book instance.
I know simple way to create repo and associate it using sagemaker via GUI easily.. However, is there any way we can associate via template.
I found similar info on https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html But it doesn't show with cloudformation
SageMaker now supports associating code repository including CodeCommit and any other Git repository with Notebook Instances via CloudFormation.
Here's the link for more information: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-coderepository.html
Is it somehow possible to configure Artifactory via a CLI or a Rest API?
For example I'd like to add users or repositories.
It looks like its possible to configure it via https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-CreateRepository. But Artifactory Pro is necessary to use this features.