Comments (5)
Presumably this would happen when you do something like 'dorgflow 12345' without a git clone yet.
That's not going to be completely straightforward. The process would be something like this:
- retrieve the issue node (as currently done)
- check we're currently in a git repo. First problem here: what if you're in a Drupal core repo and wanting to work on a contrib project? (I tend to have all my contrib git clones in a folder called 'sandbox' and then symlink them into a Drupal codebase, but that's just me.) So the options are:
- no git repo: need to clone
- found a git repo: figure out whether it's a repo for Drupal core, or for a contrib project. The issue node data we've fetched will have a node ID for its project reference field, and we ideally shouldn't fetch the project node as that will slow things down, so we should hardcode Drupal core's node (3060 IIRC) and check for that.
- if the git remote is Drupal core and the issue's project is something else, we need to clone
- anything else, assume we're fine and that the current git repo matches the project of the requested issue.
- (optional) Need to clone: prompt the user whether to clone the repo. At this point, we do need to get the project node, as we need the project short name for the git clone command and also for the user prompt.
- Continue as normal with getting patches from the issue node etc.
Given the need to prompt the user, I think this is going to be postponed until #4 gets in -- though I'm struggling with that.
from dorgflow.
Yes it think it's just a nice-to-have.
Also i think it does not need to ba auto-magick. A simple option like --clone-project (which is asumed when not in a git) would do.
from dorgflow.
I've had this requirement myself too and even more so, inside of a composer based Drupal project environment, this was always difficult because each composer update
in the project root would also reset my modules projects if a released version was required by that root project.
To solve all these requirements I've developed a composer plugin which does the trick: https://packagist.org/packages/lakedrops/dorgflow
Please let me know what you think.
from dorgflow.
I'm afraid I don't know much about Composer, and to be honest, I avoid using it as much as possible as it always seems to break things for me.
But it looks like you've made something pretty useful for those people who do manage to get Composer not to burn their kittens! If you want to file a new issue & a PR to add something to the README with a link to your project, please do!
from dorgflow.
Thanks @joachim-n I've created that pull request and would be happy if you committed that.
Regarding your trouble with Composer, I'm surprised. I hear that every now and then but with Drupal 8, I can't imagine how to live without composer and it looks like even more so in the near future. But that's probably off-topic here.
from dorgflow.
Related Issues (20)
- Not working as expected on big issues HOT 3
- improve error messages
- doesn't handle two branches with same issue number
- add a diff command
- Compare with drush-iq and drupalorg-cli HOT 3
- Before "git diff-files" you should execute "git update-index --refresh" HOT 2
- Detected master branch xxx, but it is not the current branch. HOT 1
- It will be useful give full example HOT 1
- Create patch not in project folder HOT 6
- Wrong path to autoload.php HOT 4
- Better Install documentation for D8 projects HOT 12
- Patches for Drupal 8 Core broken if using drupal-composer/drupal-project HOT 2
- New files in patches are not committed by dorgflow HOT 5
- Add command line help HOT 3
- Not compatible with Symfony 5 HOT 3
- Better install experience
- PHP Fatal Error: Return value of LocalSetup::execute must be of the type int, "NULL" returned. HOT 6
- Add return values to commands
- Increase version of symfony components for PHP 8
- add command to make a patch for Composer patches
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 dorgflow.