alexellis / derek

Reduce maintainer fatigue by automating GitHub
https://github.com/alexellis/derek/blob/master/USER_GUIDE.md
MIT License
808 stars 70 forks source link

Use repo default branch #171

Closed jolheiser closed 3 years ago

jolheiser commented 3 years ago

Description

This PR resolves #168. GitHub sends a repository's default branch along with webhook payload, so this is fairly straightforward with a small refactor.

Motivation and Context

How Has This Been Tested?

This PR passes the make test step, however I have not yet tested a running Derek.

Types of changes

Checklist:

alexellis commented 3 years ago

Thanks for sending a PR.

I just wanted to let you know that I can't merge the PR unless you've tested it end to end, because several end-users and projects rely on Derek being 100% functional.

This PR passes the make test step, however I have not yet tested a running Derek.

What I'd like to see is Derek tested with a regular repository using master as the default branch, and whatever other use-case you had in mind, I assume it would be for the "main" branch?

Could you also verify with a public + private repo?

Setting up Derek is relatively quick and painless and we provide instructions in the docs, however GitHub Apps have a few steps you need to follow carefully. You can use inlets if you like, to get webhooks.

If you need any synchronous help - feel free to reach out on Slack in #general.

alexellis commented 3 years ago

@cpanato would you be interested in doing the testing here? IT seems like @jolheiser may have got too busy, or perhaps wasn't able to put in the time to test this change end to end?

cpanato commented 3 years ago

@alexellis I did an e2e test on my side (https://github.com/cpanato/testing-ghactions/pull/28) using a master branch and then change it to main for both public and private repo and works fine for me

I did the rebase of this PR, if you would like I can push it

alexellis commented 3 years ago

Sure, please push it up and start your own PR. Add the text closes #171

cpanato commented 3 years ago

I can push to this existing PR, so the contribution from the author will not get lost

jolheiser commented 3 years ago

Hello!

Very sorry, I got busy and then it slipped my mind. I'm glad you were able to test it @cpanato, feel free to either push here or open your own. I have no qualms with either. 🙂

Again, sorry I left this PR to languish!

alexellis commented 3 years ago

I can push to this existing PR, so the contribution from the author will not get lost

No, that's not necessary or how attribution works (it's based upon commits, not PRs)

You can simply run git commit -s --amend, and it will credit you both.

Push up your own branch + PR and you will see.

cpanato commented 3 years ago

this PR can be closed in favor of https://github.com/alexellis/derek/pull/174

jolheiser commented 3 years ago

this PR can be closed in favor of #174

Thanks again!