Is it possible to make redmine intercept the commit messages and act, like on assembla, if I commit and write fix #12 than issue 12 status changes to fix.
Any plugin for this behavior?
No plugin needed, it works the same way as it works for SVN or mercurial.
However, in order for redmine to pick up the new commit messages, you either have to open the repository page in redmine, or schedule a task to do so regularly.
as #afarazit said, plus you probably want the issues to update live in Redmine without needing to manually enter in the Repository tab to force the refresh.
That can be done by using this server-side post-receive hook:
#!/bin/bash
_apikey=YOUR_API_KEY
_projectid=YOUR_PROJECT_ID
curl -k "http://REDMINE_SERVER_URL/sys/fetch_changesets?key=$_apikey&i
d=$_projectid"&
Redmine has this functionality by default. You can use refs, references, IssueID for references and fixes, closes for fixing issues. You can also add your own keywords to be parsed from redmine and do stuff to your issues.
You can find more info on documentation
Related
I'm using the code from a github repo for my project, and have been trying to understand some of the dev history about a problem I'm having. However, I'm unable to list the commits from one particular developer. Usually, you will see a link option to list all the commits, on the page of any one commit of any given author. But for this one dev only, that link isn't there. Github docs say this could be due to that author no longer having a github account, but that isn't the case here. Also, I can manually append a commits?author=username to the URL, but that doesn't work either. The only way I can see the commits is to load the network graph, scroll the timeline, and mouse-over each commit dot one at a time. It is a difficult way to scan through dozens of commits.
This is best done locally. Clone the repo and then use log or shortlog:
git log --author=author#email.com
or
git shortlog --author=author#email.com
gitk also supports the --author option to filter commits by author.
The Sitecore documentation provides some pretty clear instructions on how to configure a Sitecore instance as a processing server:
https://doc.sitecore.net/sitecore_experience_platform/xdb_configuration/configure_a_processing_server
However, many of those steps require enabling/disabling of files manually on the installed server. Has anybody seen or built a patch file (similar to SwitchMasterToWeb) that can disable/enable the appropriate functionality as a patch? I would rather not touch the default Sitecore install and instead rely on automated deployment of configuration patches.
I haven't seen this as a patch and not sure if its possible to do this with just one patch (would love to be proved wrong), but for something like this I've used a Powershell script.
I set up Octopus Deploy to run a Powershell script step after deploy to disable files and change settings if patch files can't do the job.
I can highly recommend the Powercore tools for this kind of thing.
https://github.com/adoprog/Sitecore-PowerCore/tree/master/Framework/ConfigUtils
If anybody else winds up looking for this, I've posted some work up on GitHub for patch files for a variety of versions for 8.0:
https://github.com/jst-cyr/Sitecore-Role-Configs
The patches there will do the 'disable/enable/change' for authoring, delivery, or processing. I don't have one for the reporting server.
Sitecore has evaluated POC for same. At this point of time applciable for Sitecore CMS 8.1 rev. 160302 (Update-2). See here-
https://github.com/Sitecore/Sitecore-Configuration-Roles
I probably end up re-inventing parts of the github REST API for my own repo server. But maybe there is some server script to do that already out there? Or maybe you have other suggestions?
This is my use case:
I am developing a Firefox Extension, that shall display the data of a
git log -- <path>
I always could write a little server script that implements the well developed JGit and does the "git log" command there. But then, the FF extension depends on that server script ;(
I was wondering, if there exists something like the github REST API for "not-github"-repos that would be more standard as my little server script?
I also thought about a Git JS Client, like Git.JS (apparently the only JS Client; workes with node.js; Unfortunatly the project is no more active and has no documentation.) . However, I don't need a full client. I just want to retrieve some information Read Only from the remote master repo.
Although I am late to the party I have noticed a few a might contribute to the answer.
Orion Git API Orion is an Eclipse project
RESTFul Git from Hulu on github
If you haven't tried it, GitBlit is a VERY cool option. I have multiple installations on a few windows dedicated servers that I pull together using a REST API. I had it up and running in 5 minutes, in Windows, using the "GO: Single-Stack Solution".
Gitblit GO is an integrated, single-stack solution based on Jetty.
You do not need Apache httpd, Perl, Git, or Gitweb. Should you want to use some or all of those, you still can; Gitblit plays nice with the other kids on the block.
This is what you should download if you want to go from zero to Git in less than 5 mins.
I would say you definitely need to implement some kind of server-side code by your own.
You can choose any server-side language you like. I believe ruby or python will work fine. Than create simple web-site with one page embedding output of git log according to the parameters given.
All other options will not work for you, I believe. You cannot remotely access git repository's history due to distributed nature of git — you can read history of your local repository only.
Reading that web-page by your extension and parsing output will give you what you need.
What is the great motivation behind integrating Redmine with a source control repository ? If it is only for monitoring reason, developers already have access to repository and they can do whatever they want diff, history with their IDE. For other people do they really need? I'm afraid, I can't see the real reason. Can you please help me to see ?
When you fix a bug that exists in Redmine's issue tracker, you can refer to the issue id in the commit message and Redmine will automatically associate the commit with the issue (or even close the issue).
This saves you the double work of referring the issue in the commit message and closing the issue in Redmine.
By the way, this is not Redmine-specific - you can do it with most bug trackers that offer source control integration.
I don't remember the exact syntax in Redmine right now, but most of the time, the syntax is something like:
fixes #123
...which would cause Redmine to automatically close issue #123, and create a link from the issue to the commit (and vice-versa).
I started my Django project locally and have been using git just fine.
I got ahead of myself and copied the code to the server which instantly became out of sync with my local version. I hadn't done a branch or anything.
The two part question is what's the best structure for me to work locally, push/pull to test server and then update live server when test is solid, and how do I get it setup from where I'm at?
I've been developing with no branches in these early stages, but I'd like to instead follow standard practices for branching and merging.
I'm using NetBeans 6.8 locally for coding and I've also got GitX. So any integration tips would be helpful also but I'm comfortable doing whatever command lines are necessary.
Thanks!
James
First you should be able to have some form of communication between the git repositories you've got on your local machine, the test server and the live server. Git is very flexible in this regard so a few of the options are:
Have the test and live server pull
from your local repository.
From development push to the test and live servers on appropriate times.
From development push to production and have the test server pull from production.
Have a fourth location where you'll store your git repo and push from development to that repository and have test and live pull from there.
Either way, once you reach a stage where you'll want to try something on the test server, create a tag. On the test server checkout that tag (git checkout <tagname>) and do your testing. (And once you are satisfied that it works the way you want, you can also use that tag on production. But I guess that's pretty obvious. :) )
The intermediate step, between creating the tag and checking it out, completely depends on your setup. Using the fourth option I just mentioned you'll need to push your tag first and fetch it on the testing machine. So the whole process would look similar to this.
<development>$ git tag v1.0
<development>$ git push
<development>$ git push --tags
<testing>$ git fetch --tags
<testing>$ git checkout v1.0
<live>$ git fetch --tags
<live>$ git checkout v1.0
Optionally you can (ab)use git decribe to check which tag you've got checked out at currently.
Regarding the branching and merging: what I like to do is create a branch for every feature I'm working on. Once I complete that feature I merge it back to master. So If I need to release before a feature is done, I can just leave that feature (and every releated) commit out of the release.
But this is just one way of doing it. You can setup the workflow to suit your situation. Especially regarding the use of branches. A more complex setup is described by Vincent Driessen in his article A successful Git branching model.
Disclaimer: I'm using git almost exclusively with one authoritative repo on a server (the fourth option). I haven't personally tried the other setups I suggested...
Update to respond to the comment by iJames:
To make dev push to and test pull from a new/different repository by default from now on, see the accepted answer of this question:
$ git branch --set-upstream master origin/master
With regards to the terminology:
Push is relatively simple: it pushes your local commits to a different repository. See for instance the Git User's Manual.
Fetching does the opposite, it "will update all of the remote-tracking branches to the latest version found in the repository". (Quote from the Git User's Manual.)
The pull command not only fetches the changes in, but also merges them into the current branch. (See the example in the official Git tutorial.)