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 codeowner workflow check #24496

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

devindford
Copy link
Contributor

@devindford devindford commented Aug 6, 2024

What does this PR do? What is the motivation?

  • Adds a new workflow to ensure that all codeowners for files/directories have to approve the pull request before it can be merged (it will be added as a required job once this is merged)
  • Creates/updates a comment about which teams need to approve before a PR can be merged and the status of each codeowner.
  • Adds platform and docs as CODEOWNER file reviewers

Passing job after last required approval https://github.com/DataDog/documentation/actions/runs/10292292875/job/28486392695

Failed check on only one approval https://github.com/DataDog/documentation/actions/runs/10292033909

Merge instructions

  • Please merge after reviewing

Additional notes

This is an after action item as part of incident web-incident-30 in an effort to ensure the teams that have some type of ownership over files are aware of changes and can review them before they are merged to production

I squashed locally since there was far too many "chore: debug" commits 🙄 so that is why there is a force push

Note from 08/15/24

The codeowner file was restructured on master and then pulled into this branch, the job outputs listed in the links shows how it worked when there was dual codeowners on the update being made originally, but now only shows the platform approval since we removed Docs from as codeowners on the CODEOWNERS file

@devindford devindford added the Do Not Merge Just do not merge this PR :) label Aug 6, 2024
@devindford devindford requested a review from a team as a code owner August 6, 2024 17:55
@github-actions github-actions bot added the Github Related to Github configurations label Aug 6, 2024
github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Aug 6, 2024

Code Owners Approval Status

✅ @DataDog/WebOps-Platform

✅ All required code owners have approved this pull request.

@devindford devindford requested a review from a team as a code owner August 6, 2024 19:07
@devindford devindford removed the Do Not Merge Just do not merge this PR :) label Aug 6, 2024
@devindford devindford added the Do Not Merge Just do not merge this PR :) label Aug 6, 2024
@hestonhoffman hestonhoffman self-assigned this Aug 6, 2024
@devindford devindford marked this pull request as draft August 7, 2024 19:10
@devindford devindford marked this pull request as ready for review August 8, 2024 15:03
@davidejones
Copy link
Member

So discussing this further we determined there are certain cases where a pr will have 2 or more codeowners where we don’t want to enforce all owners to approve.

This is when a dev team are listed as code owners over parts of the docs but docs team should be able to approve/merge without their consent as they are ultimately the owners of the content.
e.g This pr was just to fix a broken image by removing it #24767 which we wouldn't want to block the docs team on etc.

@devindford Can we scope this work to enforce only when our teams are involved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Not Merge Just do not merge this PR :) Github Related to Github configurations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants