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(dependabot): Change event type to pull_request. #10144

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:
We are still facing permission error in enabling auto-merge for dependabot PRs example: https://github.com/grafana/loki/actions/runs/5737803871/job/15550129786?pr=10138

After discussing it with internal security team, they asked to try changing the event type from pull_request_target -> pull_request.

Personally, I suspect this would make any difference, given It worked with pull_request_target when testing it with my personal repo.
https://github.com/kavirajk/dependabot-play/blob/main/.github/workflows/dependabot_reviewer.yml#L5

Auto-merged PR.
kavirajk/dependabot-play#15

But still wanted to test this.
Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

We are still facing permission error in enabling auto-merge for dependabot PRs
example: https://github.com/grafana/loki/actions/runs/5737803871/job/15550129786?pr=10138

After discussing it with internal security team, they asked to try chaning the event type.

Personally, I suspect this would make any difference, given It worked with `pull_request_target` when testing it with
my personal repo.
https://github.com/kavirajk/dependabot-play/blob/main/.github/workflows/dependabot_reviewer.yml#L5

Auto-merged PR.
kavirajk/dependabot-play#15

But still wanted to test this.

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
@kavirajk kavirajk requested a review from a team as a code owner August 2, 2023 12:18
@kavirajk kavirajk merged commit c795565 into main Aug 2, 2023
5 checks passed
@kavirajk kavirajk deleted the kavirajk/change-event-type-dependabot branch August 2, 2023 12:53
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>
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