I am trying to create a pre-receive hook in github enterprise. I want to put a check on commit message, that it should contain a jira id (say 'RP-123') along with some text. And that commit shoould be visible in jira as a link to github.
Can someone please help me with this.
Thanks!
I have integrated jira with github by adding it to OAuth Apps under developer settings.
I tried to add an executable script under /git/hooks folder to verify commit message, but this is going to do only client side verification since .git folder is not version controlled in github.
Can you please let me know how to add server side verification for commit message and how jira will be linked to those specific commits
If I’m not too late, you can do this using pre-receive hook. An example of pre-receive hook using regex is here: https://github.com/github/platform-samples/blob/master/pre-receive-hooks/require-jira-issue.sh
Related
I am not a programmer/software/dev to need to get too many git[hub] tools installed, or use anything locally, if someone could please answer for me a very simple question.
Background: the only way I could ask for some modifications for an environment I need to work on, non-software-dev related, is via what it is being described to me as a request I need to produce as described below:
go to this GitHub URL (I have a login for that)
create a branch
modify files X, Y and Z (apparently some orchestration configs) you need, as described in other instructions
commit
push
create a PR, and someone will check, approve and trigger the orchestration tool with the configs you modified, and get you what you need
Is all of the above possible using the web interface to GitHub, via my browser, without the [almost all instructions I found, so far, online, pointing to] installation of git (desktop or CLI) on my laptop, creation of a local copy of the main/master repository, then branching locally, then ... ?!?
Yes, you can do all of those things you listed out via the browser as long as you follow the steps correctly.
If you open the file in the browser you can click edit and edit the file. After you are done editing, you can type a commit message and create a pull request on a new branch.
Here you can click on create a new branch and start a pull request. It will do those things automatically.
If you have no write access of the repository it will actually directly create a fork on your account with the changes and start a pull request...
I generate a pull request in the company repo on GitHub. My colleagues login to GitHub, review my changes and add comments.
Is there a way from me to pull those comments (or that PR) from GitHub so I can read and, ideally respond to their comments locally from within the latest PhpStorm (version 2017.3.4) or for that matter, from the CLI?
I can see how to generate PRs in PhpStorm and push them up to GH, but not the other way around.
You might try this plugin: https://plugins.jetbrains.com/plugin/10448-github-code-reviews-plugin. In general, this is not yet supported in PhpStorm out of the box, you can vote for that feature request at https://youtrack.jetbrains.com/issue/IDEA-85079 and try out some of the suggestion listed there (e.g. the plugin mentioned above).
I'm not sure if there's something for Github, but for Bitbucket you can use this plugin.
I've integrated YouTrack with GitHub, I have hook set up on git hub, I can run commands on youtrack from git commit messages. I've also integrated IntelliJ with GitHub, so I see issues' ids as YouTrack links like this:
I wonder, can I configure something similar on GitHub? Can it create links from my issues' ids?
Unfortunately not. This is something GitHub would have to implement themselves and isn't available as an API method.
I'm using the excellent Sprint.ly to manage my project. I'm using git for source control and Sprint.ly has an excellent integration with github by taking its post-receive message and scanning for changes (see their documentation).
I'm not using github to host this repo, instead I'm using my own private server. How can I recreate the github post-receive message and post it to sprint.ly? I'm not very good at writing scripts like this so any help would be greatly appreciated.
See the following repository:
https://github.com/mbmccormick/gitosis-webhook
I was able to integrate with sprint.ly using this post-receive script, modifying the URL variable appropriately.
Hope this helps,
Aaron
I work for a small agency that works mainly with php, and we were searching for a simple form of version control. I came across cloud9, and it seemed perfect, but I found no way to integrate it with our servers.
However, cloud9 does integrate seamlessly with github, which made me think is there a way to integrate github with my server. Now I'm under the impression that you can use a 'post_commit' hook in svn to ftp a file to a server when a commit is made. Is there a feature similar to these that I can use with a github repository to automatically send a file to a server when a commit is made? Or is there any software I can install on my server to listen for any changes in a github repository to update itself when any changed are made?
GitHub offers post receive hooks, which can be used to do what you want. Whenever you push to GitHub a POST request to a pre configured URL is sent. The body of the POST message contains a JSON structure with all the information about the push and the commits involved.