GitHub Actions - Trigger workflow from projects (v2) - github

I'm trying to create a GitHub action/workflow that will close an Issue when it's State field is set to "Done", but looking at the documentation it appears there are only triggers for the classic projects. Is this correct, are there no triggers for projects v2, or am I missing something?

Related

How do I trigger a Github Action on project card movement?

I need a Github action which closes an issue when that issue is moved to a "Done" column on a Github Project.
My issue is that the project_card trigger only works on "classic" projects. Github specifies this in their documentation for the project_card trigger: "This event only occurs for projects (classic)."
I would use a classic project, but unfortunately Github has made it so classic projects cannot be created for repositories unless that repo has an existing classic project. I assume this is to phase out classic projects, which is fine except for triggers like project_card which only work with them.
Hoping there is some form of solution for project_card trigger to work with non-classic Github projects in the interim?
I tried using this Github Action with a non-classic project, but the action uses the project_card trigger which led me to this issue.

Move issues in project boards using GitHub actions

I want to create a workflow for moving issues in GitHub project boards such as:
When someone creates an issue it moves to the project board "To do".
Once the developer creates a branch with issue name then the issue should move to the different project board "In Progress"
Once the developer finished his work and merge it with the master branch then it should move to project board "Done"
I got some workflow for creating a branch for issues and move-in boards but I am unable to create the flow.
Github API
There is a full project section in the Github API with endpoints you could use to customize your workflows.
Note: here is a similar question
Github Actions
There is also a Github automate project action on the Github marketplace, to use directly in your workflow if it match your context.
Note: There may be others on the github marketplace

Adding a custom "Where is your code" source

If at all possible, how can one define a custom source for the "Where is your code" selection in Azure DevOps?
Purely for example, say I wanted to use GitLab as my source. Given that no current extensions exist in the marketplace that do this, how could someone go about defining one that adds a custom source for Azure DevOps Pipelines?
While it is true that one could store the pipeline definition in one location and use a "checkout" task to clone the code itself, such a technique causes some functionality to be lost (build status reporting, for example).
Additionally, while using "Other Git" allows one to connect to any git repository, it has its own issues:
You would need to create a custom service connection per repository. This is not sustainable given a large number of repositories.
You still will have the issues found when storing the pipeline definition in one place and checking out a specific repository: loss of build status reporting, PR/merge decoration, etc.
I have looked around Microsoft's documentation websites, as well as the various repositories like the Azure DevOps Task Lib, but I have not found anything that even states if this is possible.
Update Feb 17, 2020
As per the answer below, this is not possible today (Feb 17, 2021). I have opened a corresponding User Voice idea: Custom code sources for Azure DevOps Pipelines
how can one define a custom source for the "Where is your code"
selection in Azure DevOps
For this issue, I am afraid that this is currently not possible in azure devops. If you want to select a custom code source for the pipeline, then you cannot avoid creating gitlab service connections. Currently azure devops only provides the option "Other Git" to choose from.
As a workaround , you can try to create repository mirror​​​ing. Repository mirroring allows for mirroring of repositories to and from external sources. It can be used to mirror branches, tags, and commits between repositories.
Push: for mirroring a GitLab repository to another location.
In addition, you could add your request for this feature on our UserVoice site , which is our main forum for product suggestions.After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.

How to automatically trigger a build after a PR is completed in Azure DevOps

Is there a way I can set up a build in Azure DevOps to automatically run every time a PR is merged and completed and contains a specific keyword in the name? for example: "Some PR name here [RUN_BUILD_123]"
Edit:
The reason for this is because I have different builds on top of the same branch so instead of triggering all the builds I just want to trigger those that I know need to be rebuilt based on the particular projects getting changed.
A PR has a target-branch. If you want to trigger a build after a PR is completed just configure a build with a ci-trigger for that target-branch. You can't check for certain keywords in the PR-name unfortunately
Agree with D.J. For detailed setting, you can check the Enable continous intergration option in the Triggers settings, then select the target branch you want ci-trigger build in the Branch filters.This will automatically trigger the build after pr is completed.
But you can't do it if you want to include special keywords in pr name.
Topic is a bit old, but if there is anyone who want's to archive this stumbling over this topic - here is my approach how I would solve this:
The basic of all are scripted pipelines, so if you still do it in the GUI - that's wasted time. Create a .yml build and put it into your Git. The M$ documentation is really helpful with this.
Create the trigger for your branch
Put this on the first line, so the pipeline will be executed when master (or your branch) has a new commit
trigger:
branches:
include:
- master
Read out the commit message via the VSTS variables
Trigger the builds, based on their ID via REST API (you can use the pipeline token for authentication)

VSTS-GITHUB Workflow

Please elaborate the steps to create a workflow of Visual
Studio Team Services and Github.
Integration of Github with VSTS and creating a workflow.
Once we create user stories in vsts, is there any way to create a
transition from one state to another(New->Active->resolved),
based on repository update(github).
There is a way to transition from on state to another when github repo is update:
Create a CI build definition for the github repo.
Add a power shell task to change the stories state.
But usually user stories are linked with repo on VSTS not github, that’s more useful and meaningful.
Automatically is only using VSTS git repo.
If you like update this, you need to create a manual integration, possible using the VSTS Rest Api.