I asked myself several times howto enhance the pull-request comment/answer+change code process. We are using bitbucket as git server frontend. When a user make comments in a pull request, he/she is commenting source code changes in the web gui of bitbucket.
Now the uncomfortable process comes in: When a user is reacting on the comments (e.g. by changing the code concerning to the comments), he allways needs to switch between the web gui of bitbucket and a text editor in order to apply the changes in code. "A lot" of time is used to find the correct location (especially when the line numbers are shifted because of inserts/deletes above in the file).
Question: Is there any desktop client (me I am interested in a window client) that supports pull request and displays the comments in an editable local file copy? I mean like in a diff viewer (K3Diff, TortoiseDiff, ...) where you see diffs (or in my case the pull request comments) and can make changes direct on the local working copy next the comments of the pull request?
Related
Sometimes I want to provide a link to some source code in the comment to an issue.
If I open repository in browser and find the fileI need, the link refers to master branch by default. It means that over time the code referred by the link will change, because the master will move together with commits history.
In GitHub and GitLab when you want to get a permanent link on a file you just opened, it is enough to press y on the keyboard and the link will switch from referring the master branch to particular commit hash it points to.
I.e. https://github.com/octocat/Hello-World/blob/master/README -> https://github.com/octocat/Hello-World/blob/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/README
At work I use BitBucket server (v7.10.1, if it matters) and unfortunately the y does not work, and I also do not see any button on UI to get permanent link. How can I achieve the same result (get permanent link) on BitBucket server?
I know a couple of tricks I am not satisfied with:
using Bitbucket Linky plugin for Intellij, but I want a more light-weight way
pressing History button on a file, and choosing the most recent one (but it does not give you the master hash, it gives the hash of the last change of the file. And also this button won't work if the file has a single version and never changed after the 1st commit)
Got to the version you want, and then click 'Raw file' (top right hand side of screen)
The path in the address bar should now be a permanent link. It will be the raw version of the file unfortunately, but it is a permanent link.
I am a noob to github's organziation settings and all. Don't know if we need these settings for the question Im about to ask.
So what I want to achieve is to show the already opened pull request's link on a subsequent push. In the past when working with bitbucket and gitlab with a development team, the link used to appear both on the initial push to create a pull request and also on subsequent commits push to PR. But in my current workflow it only appears on initial push to create the PR. (Note I haven't been setting up repositories in the past myself and just starting to explore this area so no idea if in the past lead engineer has been adding any settings or not)
This is what I see on initial push:
And this is on subsequent push. No link to already opened pull request
What am I missing? And is it even possible to do?
Any read or keywords to search for would be appreciated.
First a remark : when running git push, lines prefixed with remote: are actually generated by something on the remote ("something" = a script or a program or ...). If you want to see something more, check if there is some setting on Github's side to re-display the merge request number when you update a branch (I must confess I don't know if and how this can be done).
If you want to find what pull request is linked to a known branch, there is a specific search filter (in the web GUI) for that : head:branch_name
As an example :
Here is how you could get PR #1037 (linked to a branch named leaksan-100-part2) on git's repository :
is:pr head:leaksan-100-part2
If you want to get this from a script, you should probably use Github's API :
the doc to Pulls API mentions a base attribute :
base string query Filter pulls by base branch name. Example: gh-pages.
Tech writers are going to edit text in JSON files via github in our project. Since they never used a IDE (and don't need to) we think about using the web GUI of github. We have a CI, but it would be very cool, if we could run a check before the commit gets done.
Example:
Step 1: tech writer opens in github the JSON file
Step 2: tech writer updates a string
Step 3: tech writer presses button to save the changes
Step 4: Some simple script executes and checks the content of this particular file.
Step 5a: Everything fine? Then commit - END
Step 5b: There is a syntax error. Show the error message to the tech writer.
Is this possible?
GitHub doesn't provide this functionality, and it's not likely anyone else does, either.
In order to do this, GitHub would have to have a non-bare repository on their servers and let you run an arbitrary script. Bare repositories are packed and can be much smaller than a full working tree, and even if GitHub had a working tree, it wouldn't necessarily be on your branch, which would delay the process. Running an arbitrary script is a security risk, and it's not guaranteed that your script would run fast enough for the process to complete in a reasonable amount of time. Your script would also need to run via the API, which has hard limits on response times.
There is GitHub Actions, which lets you do this, but that doesn't provide real-time checking like you want. It is appropriately sandboxed and single use so you can arbitrary scripts.
I should note that Git also doesn't provide real-time checking here: the best it can do is pre-commit hooks to prevent you from committing bad changes (if you've chosen to enable them).
Upon brief Google and SO search, I couldn't find any info on this. I am looking at this Github repo which hasn't been updated for years, but there are many forks that are still being developed actively. Is there any way to search through commit messages from different forks of this Github repo network?
Beside the Google search already mentioned, another more precise alternative, if that repo is not too big, is to:
list all the forks with this API GET /repos/:owner/:repo/forks
clone them, and do a git grep in each of those local clones.
That way, you are sure to have a complete search.
See also the python frost-nzcr4/find_forks script.
View the Developer Tools while you're loading the repo network page. In the log you'll notice there's two urls - "meta" and "chunk".
Meta is the (json) list of all the users who are in the network and various properties needed to draw the graph, and "chunk" is the commit log from all the users in the graph, which is used to render the tooltips that come up.
Save these outputs and use your favourite text editor / command line tool to search the commit messages.
Recently GitHub introduced some new features including Pull Request Reviews.
In the past, line comments in Pull Requests would collapse like this after the line was changed in further commits:
Since the launch of the new feature, line comments no longer collapse even after further commits that address the issues. So far I've only had one PR and I'm not sure if the reviewer added single comments or used the new "Start a review" feature.
How can I get the old behaviour back or does it improve in the new "Start a review" feature?
I've watched their video tutorial on this feature and I can't determine whether the behaviour right now is what I'm supposed to be experiencing.
I sent a message to GitHub support and received the following response:
Sorry for the trouble! We are aware that with reviews comments no longer become "outdated" after new code is pushed.
This is definitely on our radar as something we need to address. I can't give a timeline for it, but we will be looking into it soon.
Since two years ago, GitHub now (august 2018) proposes "Collapse all diffs in a pull request at once":
When a pull request contains a lot of changed files, code reviewers can find it hard to isolate the changes that are relevant to them.
Now you can collapse (or expand) the contents of all diffs in a pull request by holding down the alt key and clicking on the inverted caret icon in any file header.
You can then go one step further by using the “Jump to file or symbol” dropdown to jump to the file that you’re interested in and automatically expand it.
That is not exactly the old behavior, but that does still improve the code review process.