Skip to content

Conversation

@till
Copy link

@till till commented Feb 5, 2023

  • Chore: upgrade go to 1.19
  • Chore: update actions
  • Update: allow push to certain branches

@till till mentioned this pull request Feb 5, 2023
Copy link
Author

@till till left a comment

Choose a reason for hiding this comment

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

Left some comments to share my thoughtprocess.


env:
GO_VERSION: 1.18
GO_VERSION: 1.19
Copy link
Author

Choose a reason for hiding this comment

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

Mostly updated to be able to use some functions and also, newer is better. :D

return base != hook.OldRev, nil
}

func (r *Receiver) CheckAllowedBranch(hook *HookInfo) error {
Copy link
Author

Choose a reason for hiding this comment

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

Made this public so I could add a test. Otherwise, the code in Handle requires a full blown setup with commits and repositories and so on. Not ideal, but hope it's alright.

@till
Copy link
Author

till commented Feb 18, 2023

@sosedoff Can you take a look some time?

@sosedoff
Copy link
Owner

sosedoff commented Mar 1, 2023

Yea will review this week.

Copy link
Owner

@sosedoff sosedoff left a comment

Choose a reason for hiding this comment

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

Looking good so far, see my comments and adjust accordingly.

till added 3 commits June 16, 2023 17:30
This extends MasterOnly and makes it configurable. The idea is to
set arbitrary branch names which are allowed to be pushed to and
otherwise return an error.

Resolves: sosedoff#33
@till till force-pushed the allow-branches branch from e2a92c3 to 1d2f53d Compare June 16, 2023 15:30
- renamed AllowedBranches to AllowedRefs
- use t.Run() in tests
@till till force-pushed the allow-branches branch from 0d2ec1d to 17559cf Compare June 16, 2023 15:40
@till
Copy link
Author

till commented Jun 16, 2023

@sosedoff this took me a bit longer than expected, can you have a look again?

@till till mentioned this pull request Jun 18, 2023
@till
Copy link
Author

till commented Apr 22, 2024

@sosedoff any interest in this?

@sosedoff
Copy link
Owner

Probably, i haven't used the repo myself in quite a bit so getting up to speed will take some time

@till
Copy link
Author

till commented May 22, 2025

@sosedoff should I rebase this so we can merge this? Or should I abandon this effort?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants