Can I add comments to task using Asana API?
I want to write hook to git in which after every local commit I would add comment to Asana and after every push I'd add comment with links to commits in github (or any other "git commit viewer").
(I work at Asana).
Yes. See the section in the developer documentation for stories, under "Commenting on an object":
https://asana.com/developers/api-reference/stories
Related
How does an admin configure Gerrit to automatically reject commits without JiRA ticket number? I've read this documentation but not sure how to implement it on all branches in a specific repository (not all repos!). Do all users need to download the file and copy it to their local repository or how does it work? What I want to achieve is that git/gerrit automatically rejects a commit that are missing a JiRA ticket number - doesn't have to be valid, it's up to the team to control that the ticket number is valid.
The Jira plugin is based in the ITS plugin. These plugins have a association configuration that can be set to MANDATORY.
MANDATORY : One or more issue-ids are required in the git commit message, otherwise the git push will be rejected.
SUGGESTED : Whenever git commit message does not contain one or more issue-ids, a warning message is displayed as a suggestion on the client.
OPTIONAL : Issues-ids are liked when found on git commit message, no warning are displayed otherwise.
The below config example is taken from the Jira plugin documentation.
[commentLink "Jira"]
match = (\\[[A-Z][A-Z]+-[1-9][0-9]*\\])
html = "$1"
association = MANDATORY
The Git::Hooks is the best solution to this job.
See how to install and configure it here.
See more info about it here.
How can I search the commit message in BitBucket? I can only search the codes but that doesn't help me. I want to find the keyword HDMI in the commit title for example.
There is a search box for commits on the Bitbucket webpage, under Commits.
If you are using source tree its easy :-)
In the new versions:
If you also have the project locally, you can also search for the log via the console. Don't forget to do a git pull first, to be on the same level as remote.
git log --oneline | grep PATTERN
To search specifically on the commits message you can use the aforementioned search box of the BitBucket page and use the operator 'keyword(string)' or 'grep(regex)'
We have a setup with Bitbucket GIT linked to JIRA issue tracker. It is possible to add special comments to GIT commit messages to update JIRA issues automatically.
However, is it possible to put the link to the Pull Request, when it is created, to the corresponding JIRA issue? JIRA issue knows the name of the branch, so it should also have information on the pull requests.
If you reference your issue keys in your commit messages, branches and pull requests then this information will automatically appear in your issue's development panel.
This requires that you have an application link configured between JIRA and Bitbucket.
This is how it should look:
More info is available on the Development Information documentation page.
Now that TFS 2015 comes with the same new Rest API of VS Team Services, I've taken a look at the API doc:
https://www.visualstudio.com/en-us/integrate/api/git/overview
One question naturally raised is that most queries do not expose an parameter for git branch or tag (e.g. download /path/to/my/file with tag 'release_v1.0'), which looks like a show stopper. As in my case, I need programatically pull out some source file under a certain branch/tag.
Is it not supported yet?
Yes you can. As or the link that you have above you can use the provided so to retrieve both branches and yes. In git they are really all the same thing, pointers. This use the "refs" api.
https://www.visualstudio.com/integrate/api/git/refs
I'm looking for a way to automatically add +2 permissions for certain refs for a lot of projects in Gerrit and unfortunately it seems there are no API calls to modify access rights, only to read them. Do you have any idea how to modify refs permissions for a big amount of projects?
I'm using Gerrit 2.9.
Thanks.
One possibility would be to create a batch script to modify the project.config for those projects and commit them back to gerrit.
This is how you can checkout the project.config for the All-Projects, it works the same for other projects: http://blog.bruin.sg/2013/04/how-to-edit-the-project-config-for-all-projects-in-gerrit/
Simply put:
Create list of project you want to change
Iterate over the lest
Checkout the refs/meta/config ref
Use script to modify project.config
Commit and push back to the server
More information about the project.config: http://gerrit-review.googlesource.com/Documentation/config-project-config.html