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

Auto-add pull requests and issues to GitHub projects #221

Closed
nedbat opened this issue Jan 23, 2023 · 3 comments · Fixed by #222
Closed

Auto-add pull requests and issues to GitHub projects #221

nedbat opened this issue Jan 23, 2023 · 3 comments · Fixed by #222
Assignees
Labels
bot Work on the OSPR bot (for broader projects)

Comments

@nedbat
Copy link
Contributor

nedbat commented Jan 23, 2023

Task: update the bot to automatically add new pull requests and issues to projects.

Back story: we did this with GitHub Actions (for example: openedx/credentials-themes#559), but there are two problems that would be intricate to solve:

The bot should do this work. We need to design how it should work:

  • The bot currently only looks at pull requests, so it will only add pull requests, not issues.
  • Should the bot only add "external contribution" PRs (OSPRs) to the project, or all pull requests?
    • I'm assuming it should be only OSPRs.
  • Draft pull requests: should it never add them, always add them, or do different projects have strong opinions that differ?
    • It will not add draft pull requests to project.
    • It will add a pull request to a project if it transitions from draft to ready.
    • "Draft" is determined the same way the bot already does:
      • Either the pull request is literally a draft (in GitHub terms),
      • or it has the words "wip" or "WIP" in the title.
  • Configuration: the project to add to will be indicated by metadata in the catalog-info.yml file.
    • Do we have a reason now to need to add to more than one project?
      • It will support multiple projects (easy enough to do right the first time)
  • Should it ever remove items from a project? For example, if a pull request is switched to draft mode?
    • For the first iteration, we won't remove from projects. Project automation can remove closed pull requests from the project.
@nedbat nedbat moved this to Todo in Arch-BOM Jan 23, 2023
@nedbat nedbat added this to Arch-BOM Jan 23, 2023
@nedbat nedbat self-assigned this Jan 23, 2023
@nedbat nedbat added the bot Work on the OSPR bot (for broader projects) label Jan 23, 2023
@nedbat nedbat changed the title Auto-add pull requests and issues to projects Auto-add pull requests and issues to GitHub projects Jan 23, 2023
@sarina
Copy link
Contributor

sarina commented Jan 25, 2023

Curious why you can't modify https://github.com/openedx/.github/blob/master/workflow-templates/add-new-issues-to-a-project.yml#L8-L10 to just fire on opened PRs as well

edit: I see, there are other criteria

@feanil
Copy link
Contributor

feanil commented Jan 25, 2023

This generally sounds good, specific thoughts below.

Should the bot only add "external contribution" PRs (OSPRs) to the project, or all pull requests?
* I'm assuming it should be only OSPRs.

This makes sense to me to start and we can always make the behavior configurable in the future.

  • or it has the words "wip" or "WIP" in the title.

Should we get rid of this now that Draft PRs are common? It feels like a special incantation that not everyone would know about.

@nedbat
Copy link
Contributor Author

nedbat commented Jan 25, 2023

or it has the words "wip" or "WIP" in the title.

Should we get rid of this now that Draft PRs are common? It feels like a special incantation that not everyone would know about.

We seem to still get a few WIP: https://github.com/pulls?q=is%3Aopen+is%3Apr+wip+archived%3Afalse+org%3Aopenedx

@robrap robrap moved this from Todo to In Code Review in Arch-BOM Jan 27, 2023
@nedbat nedbat linked a pull request Jan 27, 2023 that will close this issue
@github-project-automation github-project-automation bot moved this from In Code Review to Done in Arch-BOM Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot Work on the OSPR bot (for broader projects)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants