Comments (7)
I don't work as an engineer any more, so I have no stake in this feature now I'm afraid.
from gitlabform.
Hi @twhiston , sorry for a late reply!
I'll take a look at how much work would this require and get back to you.
We are of course open to getting PR with this too. Just let me know if you want to work on this so that we don't duplicate our efforts. :)
from gitlabform.
Hi @gdubicki , thanks very much for the response, not sure that i have the bandwidth to work on this myself atm (sorry i know that sucks!), but if no one else has time in the New Year I might try to jump on it. If you do make an assessment of the effort required please do share it on here. The easiest way to deal with it manually is to commit some dummy file content with the api so that the branch can be created (a generic readme in this case), so that is how we are working around it currently before calling gitlabform to apply the settings that we need.
Thanks for an awesome tool!
from gitlabform.
Should be possible via https://docs.gitlab.com/ee/api/branches.html#create-repository-branch api endpoint, would be nice to implement this in gitlabform.
from gitlabform.
I know it's an old post. Thought I'd leave my feedback on this feature request.
Do you still see a need for this feature @twhiston , @lukasmrtvy ?
I ask because we want to use it to keep our repo settings in line as people create repos in our namesapce, therefore the ideal flow would be:
repo created > hook fired > gitlabform run > master branch is created and branch protection enabled.
In my view, the above workflow doesn't make quite make sense. I assume people are creating repos in your namespace using Gitlab UI. I believe the default branch (i.e. main
) is automatically created by GitLab and is also protected. So, I don't see why gitlabform would "create the protected" branch; unless your users are creating new repos using the option to not initialize the repo, which I imagine probably isn't the case.
There are also other feature request that seems to indicate if a branch doesn't exist, corresponding protection setting shouldn't be configured. Potentially these are conflicting requirement.
I'd probably tweak your workflow a bit differently. I used something like this:
- Created a GitLab pipeline in a project that takes necessary input variable (i.e. project name, group id)
- Users run this pipeline to create new project instead of doing it via GitLab UI
- In this pipeline, project is created via GitLab's API
- In the same pipeline, gitlabform runs after the project is created, which applies default config from the group level settings
Thoughts?
from gitlabform.
@gdubicki - should we close this issue since there aren't any activity and not many are looking for this feature.
from gitlabform.
Closing, but if anyone wants to actually implement this and discuss it first then please reopen!
from gitlabform.
Related Issues (20)
- Merge request approvals settings of group HOT 4
- Feature Flags support HOT 5
- Add retry feature HOT 2
- CI/CD settings: Whitelist project for Token Access HOT 1
- merge_requests_approval_rules does not respect protected_branches and breaks execution HOT 8
- [backward incompatible] Add ENTRYPOINT to the Dockerfile HOT 1
- Project transfer failing with --noop
- Error when output file flag is used with dry-run project transfer
- Add your company logo and link to the users list!
- Processing group fails if it has more than 20 members
- Add support for adding a single deploy key to multiple projects in a namespace/group as a non-administrator HOT 3
- Add 'enforce' support for integrations config HOT 3
- Drop python < 3.12 HOT 3
- KNOWN ISSUE: 3.11.0 has not been deployed to GitHub Packages (container registry) HOT 1
- GitLab 17.0 Issues HOT 1
- Incorrect order of gitlab API call for`members`, `merge_requests_approval_rules`, `branches` provided for a project HOT 4
- Project members setting ignores case
- Within the documentation site, the configuration link to "Group SAML links" page is missing on the left panel
- Migrate to hosting on GitLab HOT 5
- Unclear error message when user is removed: Warning: Branch 'develop' not found when trying to set it as protected/unprotected!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitlabform.