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

Clone ref if ref setting is set #117

Merged
merged 10 commits into from
Jan 16, 2024
Merged

Clone ref if ref setting is set #117

merged 10 commits into from
Jan 16, 2024

Conversation

qwerty287
Copy link
Contributor

Closes #81

@qwerty287 qwerty287 added the enhancement New feature or request label Jan 1, 2024
@qwerty287 qwerty287 added this to the v2.5.0 milestone Jan 1, 2024
@qwerty287 qwerty287 requested a review from a team January 1, 2024 10:09
@qwerty287
Copy link
Contributor Author

@woodpecker-ci/maintainers Can I get a review on this?

@xoxys
Copy link
Member

xoxys commented Jan 14, 2024

What is the benefit?

Copy link
Member

@anbraten anbraten left a comment

Choose a reason for hiding this comment

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

What about changing the behavior: Usually, always sha is used,
but if you set a specific plugin settings (as your example ref: refs/heads/main),
this somewhat overwrites the SHA cloning.

Not sure if I understand the changes in here. You want to clone using ref as soon as its set. The default clone step of WP would still clone using sha?

flags.go Outdated Show resolved Hide resolved
@qwerty287
Copy link
Contributor Author

Yes. If you set the ref setting manually, this one is cloned. Otherwise - e.g. default clone step - the sha is used.

@qwerty287
Copy link
Contributor Author

What is the benefit?

If you want to clone a ref, you don't need to set sha: "".

qwerty287 and others added 2 commits January 16, 2024 20:27
Co-authored-by: Anbraten <anton@ju60.de>
@qwerty287 qwerty287 merged commit d993aab into main Jan 16, 2024
2 checks passed
@qwerty287 qwerty287 deleted the separate-ref branch January 16, 2024 19:29
@woodpecker-bot woodpecker-bot mentioned this pull request Jan 15, 2024
1 task
@woodpecker-bot
Copy link
Contributor

🎉 This PR is included in version 2.5.0 🎉

The release is now available here

Thank you for your contribution. ❤️📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an option that overwrites SHA cloning via a setting (e.g. ref: refs/heads/main)
4 participants