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

✨ Enhancement: Auto-assign 'web-team' to PRs #444

Closed
gregsdennis opened this issue Mar 4, 2024 · 14 comments
Closed

✨ Enhancement: Auto-assign 'web-team' to PRs #444

gregsdennis opened this issue Mar 4, 2024 · 14 comments
Assignees
Labels
✨ Enhancement Indicates that the issue suggests an improvement or new feature. Status: In Progress This issue is being worked on, and has someone assigned.

Comments

@gregsdennis
Copy link
Member

Is your feature request related to a problem? Please describe

We have a json-schema.org/web-team team that should be assigned to PRs. This will enable notifications for everyone in the team when a new PR is opened, and anyone in the team can approve/merge the PR.

Describe the solution you'd like

I remember reading that YAML templates can define assignments, but I can't see to find the docs for it.

A custom action would do fine. (Ideally we'd want to extend an existing action, if one is available, rather than creating a new one.)

Describe alternatives you've considered

Manual assignments and tagging are inconsistent.

Additional context

No response

Are you working on this?

No

@gregsdennis gregsdennis added ✨ Enhancement Indicates that the issue suggests an improvement or new feature. Status: Triage This is the initial status for an issue that requires triage. labels Mar 4, 2024
@aialok
Copy link
Member

aialok commented Mar 4, 2024

@gregsdennis , I would love to work on this issue. Please assign : )

@gregsdennis
Copy link
Member Author

Sure thing. Go for it.

(@benjagm please make sure I'm doing this right! 😆)

@gregsdennis gregsdennis added Status: In Progress This issue is being worked on, and has someone assigned. and removed Status: Triage This is the initial status for an issue that requires triage. labels Mar 4, 2024
@gregsdennis gregsdennis moved this to In Progress in Website Contributor Board Mar 4, 2024
@benjagm
Copy link
Collaborator

benjagm commented Mar 6, 2024

@aialok are you finally working on this?

I think this can be easily achieved with the field assignees of the issue templates:

https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository

@gregsdennis
Copy link
Member Author

gregsdennis commented Mar 6, 2024

I think this can be easily achieved with the field assignees of the issue templates: - @benjagm

This is for PRs, not issues. The PR template are markdown, not YAML.

@aialok
Copy link
Member

aialok commented Mar 6, 2024

@aialok are you finally working on this?

I think this can be easily achieved with the field assignees of the issue templates:

https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository

Thank you, @benjagm. I am currently working on this issue.

@gregsdennis, I have completed the workflow file, but I have a question. As you mentioned earlier, we need to assign the PR to the web team. However, I couldn't find any API endpoint for directly assigning the PR or any actions in marketplace. Instead, there is an endpoint for requesting a review from the team.
You can check it out here: GitHub REST API - Request Reviewers for a Pull Request

I have created a workflow for requesting a review from the team. If this is acceptable, I am ready to submit the PR.

You can review an example here:
PR: Link to the PR
Workflow: Link to the Workflow

Thank you @gregsdennis @benjagm : )

@gregsdennis
Copy link
Member Author

Instead, there is an endpoint for requesting a review from the team.

This is what I meant, yes.

@aialok
Copy link
Member

aialok commented Mar 6, 2024

@gregsdennis , Can you please confirm team slug is web-team or json-schema.org/web-team?

@gregsdennis
Copy link
Member Author

I'm not sure.

@benjagm
Copy link
Collaborator

benjagm commented Mar 6, 2024

@aialok
Copy link
Member

aialok commented Mar 6, 2024

@aialok this is the team: https://github.com/orgs/json-schema-org/teams/web-team

Thank you ! Making the PR : )

@princerajpoot20
Copy link

princerajpoot20 commented Mar 10, 2024

@gregsdennis @benjagm I have a suggestion regarding this.

Our aim is to get the notification for the review from the desired team.

For this, we can use the CODEOWNERS (Github Docs)file which is provided by GitHub specifically for this feature. This file contains the usernames of the maintainers. When someone creates a PR, GitHub automatically requests a review from all the codeowners and will send a GH notification asking for review.

We can take this one step further by creating different teams for various areas within the repository. We can also divide maintainers by section, such as assigning different people for docs or .md files and others for any other specific folder (eg. pages/blog folder section in repo) or the overall project. Any combination that we want is poosible.
To merge the PR, We need at least one approval from the codeowner of the area of files affected.

Here is an example of the CODEOWNERS file from AsyncAPI's website:
Screenshot 2024-03-11 at 2 46 09 AM

This is how it will work in the PR:
ss1

@aialok
Copy link
Member

aialok commented Mar 10, 2024

Thanks @princerajpoot20, this looks cool can be implemented : )

@gregsdennis
Copy link
Member Author

I like this solution. Nice find!

@benjagm
Copy link
Collaborator

benjagm commented Mar 11, 2024

Closed as completed with #505 . Thanks everyone!!

@benjagm benjagm closed this as completed Mar 11, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Ready to Review in Website Contributor Board Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Enhancement Indicates that the issue suggests an improvement or new feature. Status: In Progress This issue is being worked on, and has someone assigned.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants