Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add project board automation for auto adding issues #200

Open
russellb opened this issue Apr 11, 2024 · 4 comments
Open

Add project board automation for auto adding issues #200

russellb opened this issue Apr 11, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@russellb
Copy link
Member

This feature is quite a bit different than what we have done so far. If we take the mission of the bot more broadly as "custom automation in GitHub for the InstructLab project", then I think this fits, but I'm interested in input on that.

We are using project boards for tracking purposes. Some boards (backend, for example) span several repos that represent a logical group of work. Another example is a documentation board that tracks doc things across repos.

https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/adding-items-automatically

While working on the backend board, I noticed we are limited to 5 workflows for auto adding items to the project. In other words, we can only auto-add from 5 repos to a single project. Worse, I think this limit is going to drop back to 1 if we move from GitHub Teams (paid) to a free plan once it's fully open.

This is all quite annoying, and I don't think it would be hard to just do this ourselves in the bot.

project_auto_add:
    board_name:
        - instruct-lab/repo1
        - instruct-lab/repo2
    board_name:
        - instruct-lab/repo3
        - instruct-lab/repo4
        - instruct-lab/repo5

We can act on issue created / pull request created events to auto add to the projects per the configuration.

This is optional, but we could also consider a periodic task that would check to see if any got missed, like when the bot was down for some reason. That's more complicated and maybe not worth it. Maybe there's even a reason folks would remove issues from a board if they think they shouldn't be on there for some reason.

@russellb
Copy link
Member Author

This is probably better suited to a github action -- https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions

A benefit of doing it in our bot is having a single place to configure the logic across all repositories and projects in InstructLab.

I don't have a firm conclusion on best / preferred implementation - just capturing ideas and options

@vishnoianil
Copy link
Collaborator

@russellb Wondering if you are still thinking about this idea.

I think the implementation part should not be very complicated, as long as we have clear policy where to add the issue and policy. The only concern i see from the bot perspective is

  1. If we need to do the periodic check over the issues and pr, we probably will hit github limits, otherwise i think we should be fine.
  2. Each repo needs to install the app, assuming the private repos won't have any concern with that.

@vishnoianil vishnoianil added the enhancement New feature or request label Apr 26, 2024
@russellb
Copy link
Member Author

@russellb Wondering if you are still thinking about this idea.

@vishnoianil not actively working on it or anything. I just got annoyed when working on a board that had more related repos than github allowed automatically adding from. That problem still exists.

I think the implementation part should not be very complicated, as long as we have clear policy where to add the issue and policy. The only concern i see from the bot perspective is

  1. If we need to do the periodic check over the issues and pr, we probably will hit github limits, otherwise i think we should be fine.

Yeah -- would have to tune this. It could be only based on webhooks, though, which is simpler anyway. Cleanup of what's not already done could be a manual task.

  1. Each repo needs to install the app, assuming the private repos won't have any concern with that.

Yeah. The bot app is installed at the repo level right now, but I think it's possible to have it on ALL repos. We just have to make sure the code isn't making assumptions that all webhooks are related to the taxonomy repo. I'm guessing we do that now.

I'm not even sure if this should be in this bot at all. I proposed it for convenience, but this is a generally useful feature outside the context of instruct-lab. I could imagine a GitHub app that adds project automation features above and beyond what GitHub supports natively. Imagine something like Mergify, but focused on GitHub project management. I think that could really take off.

@vishnoianil
Copy link
Collaborator

vishnoianil commented Apr 26, 2024

@russellb Wondering if you are still thinking about this idea.

@vishnoianil not actively working on it or anything. I just got annoyed when working on a board that had more related repos than github allowed automatically adding from. That problem still exists.

I think the implementation part should not be very complicated, as long as we have clear policy where to add the issue and policy. The only concern i see from the bot perspective is

  1. If we need to do the periodic check over the issues and pr, we probably will hit github limits, otherwise i think we should be fine.

Yeah -- would have to tune this. It could be only based on webhooks, though, which is simpler anyway. Cleanup of what's not already done could be a manual task.

  1. Each repo needs to install the app, assuming the private repos won't have any concern with that.

Yeah. The bot app is installed at the repo level right now, but I think it's possible to have it on ALL repos. We just have to make sure the code isn't making assumptions that all webhooks are related to the taxonomy repo. I'm guessing we do that now.

Yes, as of now we just assume it's taxonomy. I think we should put that check in to make sure if somebody endup accidentally installing the bot in another repo, we don't get bombarded with webhooks. I will create an issue and get it fixed.

I'm not even sure if this should be in this bot at all. I proposed it for convenience, but this is a generally useful feature outside the context of instruct-lab. I could imagine a GitHub app that adds project automation features above and beyond what GitHub supports natively. Imagine something like Mergify, but focused on GitHub project management. I think that could really take off.

Yeah that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants