Is there a way to programatically/quickly assign all issues in the repo to a project? - github

It is possible to query issues through Github API. The JSON contains all info (assignees, label, milestone, ...) except the project. There is an endpoint to retrieve all projects for a repo but there is no reference between the issues and the project / project cards.
I am trying to consolidate two repos into one and hence I am also moving all issues from one repo to another. I was able to port everything except the issue project assignment. Is there a way to do this quickly? Currently it seems like I have to manually click on every single issue, assign to the project and then move the issue to the appropriate card in the project board.

Related

Azure DevOps Projects List GET not returning a project

When running the Azure DevOps Projects List GET, one particular Project is excluded from the results. I cannot find any different settings. I am the admin of it. I can add new projects, and there were projects I created before it, that all show up in the results. It's the API call as documented here: https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-5.0
I cannot find explanation of why a project is excluded from the results aside from Project State, which I have troubleshot already.
I've already tried running the GET API in the browser and I do not return the missing project. I have tried creating another project in the same manner and it appears in what is returned. I have added an argument for Project State = All, and that does not improve the outcome.
Under what circumstances is a project excluded from these results as a standard (undocumented) constraint?
edit: I am a project admin, and I have access to the default project team. I have tried recycling things in the background by changing the Project Name back and forth, and having myself removed as Admin and added back in, with no change in the API response.
edit: It seems like the more important question is how to force Azure DevOps to cycle the 'lastUpdateDate', when it's currently set to a non-date.
This may be due to the fact that the result set for the call is 100 entries. So you either need to use the continuationToken to get the next 100 entries, and so on. Otherwise, you can also use the $top query parameter:
https://-collection_url-/_apis/projects?api-version=5.0&$top=200

How to merge two GitHub project boards?

I want to move the entire project board of a GitHub repository to another. Is there any way that can be done without manually copying each and every card.
Project board is a feature on GitHub to organize and prioritize work. More
Thank you.
EDIT:
When I contacted GitHub Support, I got the following response.
There isn't currently a way to merge a Project on GitHub, but I can
definitely see how that would be useful. I can't make any promises but
I'll let the team know you'd like to see us add this feature in the
future.

Create new branch from the Issue

Is it possible to create new branch directly from Issue which is posted on Github? We have project hosted on Github with many issues, it would be easy for us just to click one button in Issue web interface and create new branch for it to start developing.
This is not possible directly from the issue interface. I can try to provide you some workarounds and maybe start a debate why one would want this feature:
Creating branches directly on the web interface
After you've noticed that you need to start working on an issue you can just go to the repository main page (keyboard shortcut gc) and create a branch with the name you want:
Chrome extensions
If this is a must for you, you can create a chrome extension that augments the UI and creates a branch directly from the Issues WebUI using the GitHub API. There's a lot of open source extensions that augment the default WebUI.
Is it the most efficient way to start a new feature?
I think this changes from developer to developer, but having worked with GitHub for 7 years using Issues I've never felt the need for this feature because unless it's a one line change that doesn't require local testing or compilation, I still want to get down to my command line and IDE. If I have to do that, I still have to at least git fetch to get the branch I just created directly through the issue interface. If that's the case I've always preferred to just look at the issue and run git checkout -b branch-name, optionally with git push if my team needs to see the branch.
Then the issue name wouldn't normally translate to a branch name, at least I wouldn't want that. So that option to create a branch from an issue would probably need to spin out a prompt to allow me to name the branch what I wanted.
This is just my personal opinion and nothing else, hope it helps :)
GitHub finally added this feature request to their roadmap.
Summary
The branch is the first thing a developer creates when the start
working on a new issue. Creating that association makes it really easy
for someone to then follow the work happening and keep everything
connected as they take their idea to code.
Intended Outcome
We want to help developers get started on work faster and signal to
their team where to find the code changes related to an issue. It
should also be really easy to then follow development to the pull
request without the user needing to do additional work to link
everything together.
How will it work?
From the issue page, a user can quickly create a branch with an
auto-generated or custom name that becomes associated with the issue.
They can then fetch the branch and switch to it in their development
environment and further development changes (such as commits and pull
requests) are automatically associated with the issue.
https://github.com/isaacs/github/issues/1125
Nope. You can subscribe this issue.
You could accomplish this by creating a small script.
I'd start by leveraging the Issues Event webhook. This will fire a JSON payload every time an issue is opened. When the webhook fires, your script can then create a new branch using the Create a Reference API endpoint. Note: URL must be formatted as heads/branch, not just branch.
There is an app that automatically creates branches for issues. You can install it here for free: https://github.com/marketplace/actions/create-issue-branch
If you want to create the branches manually instead of automatically:
It does not enable you (directly) to click on create branch from the issue. Instead you would have to write a comment in the issue consisting of: /cib. If you do that, it automatically creates the branch from the issue.
Please note I have no affiliation with the app.
Recently I saw that Github finally added this feature to its Issues Panel.
All you have to do is navigate to an Issue on Github and scroll down to the following section:

Reset build number in Travis-CI

I'm using Travis-CI with GitHub.
I would like to know if is possible to reset the build number and/or delete the related Travis page.
I tried to delete my repo on GitHub but this is not affecting the related Travis page.
Even if I create a new repo, with the same name of the previous, the build number starts from the previous one, and the builds are linking on 404 on GitHub. I know that isn't a big issue, but I would like to keep consistent all my solution.
Unfortunately we don't have a way to delete repositories or builds. If any private data has been exposed, you can always email us to have the logs stripped.
We are working on a way to archive repositories, which basically means that they'll be hidden until a new build is run, see the issue for more information on that.

Share the eclipse search result/ query

I just want to know if the search result in eclipse search view can be shared with fellow team mate as it is.
I perform a search and delete few unwanted entries and then send it to him/ her
The other person shall be able to view it exactly same manner in the search view.
Is there a way to do this?
The will be very helpful for me
You should be looking at the Mylyn project (http://eclipse.org/mylyn).
This project allows you to create tasks and send them to co-workers through a task repository (such as bugzilla, jira, or most major issue trackers). Attached to these tasks are "contexts", which associate code elements (methods, fields, classes, etc) with the task.
Here is what you would need to do:
Install mylyn (you and all co-workers)
Install the proper connector for your issue tracker (most major issue trackers have one). If you are not using an issue tracker, then you can still import and export tasks as files, but it is less easy to do, and I'd recommend using an issue tracker anyway.
Now add the task repository to your Eclipse. This is the way that mylyn speaks to your issue tracker. It allows you to create issues, bug reports, tasks, etc, from within Eclipse.
With this set up, you can now create a task associated with a task repository and activate it. You can add the desired program elements to your task by right clicking -> Mark as Landmark.
Once you have your task context complete, you can then attach the context to the remote repository (essentially attaching a zip file to the issue in your issue tracker). Other users can then retrieve the context and immediately start working with the context that you created.
It is really a great way to work when you need to share information about specific features in the code to other people on the project.