100Automations / futureautomations

Half-baked ideas for automation, full-baked ideas for automation, as well as anything in between.
GNU General Public License v2.0
1 stars 0 forks source link

Automating auditing/reporting of orphaned issues across projects #2

Open ExperimentsInHonesty opened 4 years ago

ExperimentsInHonesty commented 4 years ago

Overview

As github admins and portfolio owners, we need to be able to let project teams know when they have issues that are not showing up on any of their project boards. This process should be as automated as possible.

Current State

@ExperimentsInHonesty (Bonnie) and @joelparkerhenderson (Joel) worked on a script to review all the open issues that are not attached to any project board. (see resource 3 below)

Bonnie ended up using the data to manually create an issue in each repository, here is the example of what was created for Shared housing: https://github.com/hackforla/shared-housing/issues/289. Note: I could have put the urls to the specific issues, but I thought it was sufficient to provide the url to see all of the issues related to the task.

Future Development

If we could automate this so that it:

Action Items/Research

The above development requires the following to be addressed or answered:

Stakeholders

Hack for LA and other brigades. (stakeholder rep: the #ops team- please include Bonnie)

Anticipated outcomes

Less issues going unaddressed, leads better project outcomes and more reliable time lines Directly reduces repetitive work by the GitHub org administrator, minimum of 15 min per project in a github org.

Resources/Instructions

  1. Github query cheat sheet article that Bonnie found when searching for a way to get all orphaned issues, per project to show up on the issues page
  2. Specific query used to identify orphaned issue on any specific repo:
    • no:project type:issue is:open
  3. Joel's Git command line script (github-api-issues-query-org-is-open-no-project) that allows you to see all the issues not associated with any project board. You must generate a token of your own, and you must be an admin on the organization's github account.
  4. Instructions for 3rd party method for being able to move issues automatically to a specific project board: How to build a fully automated kanban power-up for your GitHub Project board using a custom webhook. This may or may not be what we need, but it's a good place to start.
  5. Github Actions
fyliu commented 2 years ago

Regarding this item above: "Assigning the newly created issue to the Product Management board. It doesn't seem like you can assign issues to projects using github's api." The github api does provide a way of linking issues to project cards. See the "New Organization: ..." cards here for the result of the api call https://github.com/civictechindex/CTI-website-frontend/projects/1

It's not very clear in the documentation, but the way to do it is to create a card in the project board and passing the issue id and "issue" into the call.

fyliu commented 2 years ago

I suggest automatically creating project cards in the Triage/New Issue Approval column when new issues are created. That would make this issue's automation obsolete once all the orphaned issues are taken care of.

There are GH actions out there to do this or someone at hackforla can create one.