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

chore(CODEOWNERS): Add dependabot as codeowners for dependencies #10141

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

kavirajk
Copy link
Contributor

@kavirajk kavirajk commented Aug 2, 2023

What this PR does / why we need it:
Add dependabot as codeowner for dependencies related files (go.mod, go.sum and /vendor)

This is needed because, we have branch protection rule (for main branch) with "Required review of code owners" as one of the checks
Which issue(s) this PR fixes:
Fixes #NA

Special notes for your reviewer:
Follow up to #10126

NOTE: Github linter may show "@dependabot is unknown and may not have write permission for the repo" But that's fine. I tested it on my personal repository.

example: Before having it as CODEOWNERS.
kavirajk/dependabot-play#10 (GH action waited for another user from CODOWNER to review before merging)

example: After adding it to CODEOWNERS
kavirajk/dependabot-play#13 (GH action merged the PR because approve from dependabot is good enough as it's code owner for go.modrelated files)

Checklist

Add dependabot as codeowner for dependencies related files.

This is needed because, we have branch protection rule (for `main` branch) with "Required review of code owners" as one of the checks

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
@kavirajk kavirajk requested a review from a team as a code owner August 2, 2023 10:14
@@ -6,3 +6,8 @@

# No owners - allows sub-maintainers to merge changes.
CHANGELOG.md

# Make dependabot as codeowners for specific files to auto-merge dependencies PRs
go.mod @dependabot @grafana/loki-team
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check PR description about this error on @dependabot user.

@kavirajk kavirajk enabled auto-merge (squash) August 2, 2023 10:15
@MichelHollands
Copy link
Contributor

@dependabot user

Copy link
Contributor

@MichelHollands MichelHollands left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kavirajk kavirajk merged commit 6f7d8a2 into main Aug 2, 2023
4 checks passed
@kavirajk kavirajk deleted the kavirajk/add-dependabot-to-code-owners branch August 2, 2023 10:22
@kavirajk kavirajk restored the kavirajk/add-dependabot-to-code-owners branch August 2, 2023 10:56
kavirajk added a commit that referenced this pull request Aug 2, 2023
kavirajk added a commit that referenced this pull request Aug 3, 2023
**What this PR does / why we need it**:
After some debugging and discussing with internal security squad, the
core problem for the this permission issue with auto-merge is
```
GraphQL: ["Pull request User is not authorized for this protected branch"] (enablePullRequestAutoMerge)
```

The settings "Restrict who can push it to protected branch" rule we have
`main` branch.

And currently no way to add `github-action` user to this list (there is
an open discussion https://github.com/orgs/community/discussions/25305

I proposed an idea to use some "real" user's (even grafana-bot) token to
do the "auto-merge". But that is still under review by security squad.

Meanwhile, to unblock merging any dependabot PR, I'm removing this step.

**Which issue(s) this PR fixes**:
Fixes #<issue number>

**Special notes for your reviewer**:
Related to #10126 #10141 #10144 

**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
@kavirajk kavirajk deleted the kavirajk/add-dependabot-to-code-owners branch October 23, 2023 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants