#git

git

Archived
0103

All things git (except gitops)

erik
erikover 1 year ago
archived the channel
Hans D
Hans Dover 2 years ago
We're checking if moving to Github Enterprise is a good thing, and how the migration experience is (mostly moving all the non-company user accounts to a company sso-backed user account). Any feedback appreciated
emem
ememalmost 4 years ago
Not sure if this belongs here. But please Is there a way to restrict who can merge a pull request to particular member of the team.
Mohammed Yahya
Mohammed Yahyaabout 5 years ago
Marcin Brański
Marcin Brańskiover 5 years ago
Not sure if it belongs here but github dimmed appearance works for me the best. It’s a feature preview.
Marcin Brański
Marcin Brańskiabout 6 years ago
I’m trying to add labels to PRs with github CLI.
Docs state that PR is an issue
https://developer.github.com/v3/pulls/#labels-assignees-and-milestones
And docs for issue state how to update issue with label
https://developer.github.com/v3/issues/#update-an-issue
But not yet sure how to do it for PR.

Anyone done it?
Matt Gowie
Matt Gowieabout 6 years ago
@Matt Gowie has joined the channel
RB
RBover 6 years ago
anyone create a custom github homebrew tap in a private repo ? getting authorization errors
Eric Berg
Eric Bergover 6 years ago
I have a branch on which I have a significant amount of change that I want to "merge" back to master, but I want that branch to replace what's in master now, not merge into it. I think I can use the following to accomplish that for merging mybranch into master:
git checkout master
git merge -s theirs mybranch

I have also seen it suggested that i merge master into mybranch into master first, using -s ours and then merge mybranch into master.

Recommendations?
curious deviant
curious deviantover 6 years ago
So the integration looks fairly simple for public repos. For private and internal repos however, RSS app requires basic auth. Is there a more secure way of setting up this integration ?
RB
RBover 6 years ago
could use a github action using dependabot like loren suggests https://sweetops.slack.com/archives/CB6GHNLG0/p1593449185367400
curious deviant
curious deviantover 6 years ago
Thank you Erik ! 🙂 I’ll check it out !
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 6 years ago
every repo has an atom feed for github releases
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 6 years ago
We use the built-in RSS app in slack for that. See #releases
curious deviant
curious deviantover 6 years ago
In our team, we frequently create /update TF modules that we maintain in GitHub. There are several teams consuming these modules. I am looking for a Slack- GitHub integration so that whenever we release an update the notification is published to a Slack channel. I tried googling but did not find anything pre-existing. Has anyone solved for something like this before ?
RB
RBover 6 years ago
how does everyone start new projects here ? do you have a git repository template ? do you use a skeleton creator ? or do you wing it like the most of us ?

trying to find good ways to create new repositories using sane defaults. id also like to see if repos are compliant with user defined rules if possible.
Stephanie
Stephanieover 6 years ago
@Stephanie has joined the channel
RB
RBover 6 years ago
ideally - mirror syncs ever 15 min every branch and repo in org
- all repos remote is set to urls that point to github
- github problem is detected, all repos remotes dont have to change, the urls now redirect to the mirror
- devs change code in branches, commit, push code
- devs still have access to pr system, comments, etc
- github is no longer having issues, system now syncs differences with github
- urls now redirect back to github

basically a github enterprise onprem lol

with some logic to sync it with the cloud solution

¯\(ツ)/¯
RB
RBover 6 years ago
ah ok seems like a good fallback for readonly
ikar
ikarover 6 years ago(edited)
quite interested in smarter solutions though 🙂
ikar
ikarover 6 years ago
yup, codecommit is just readonly mirror for cases you need to deploy
RB
RBover 6 years ago
or is codecommit only intended to be a readonly mirror ?
RB
RBover 6 years ago
and when things are committed to codecommit instead of github, how do you pull those changes back to github ?
RB
RBover 6 years ago
how does the mirror switch between github and aws codecommit ?
RB
RBover 6 years ago
makes sense so when github is down or intermittent, are all of your remotes sent to the sync'ed mirror
ikar
ikarover 6 years ago
for each repo separately
ikar
ikarover 6 years ago
we run that once per hour on a server
RB
RBover 6 years ago
how do you do this for an entire org on github ?
RB
RBover 6 years ago
how does the script run? is it a commit hook ?
ikar
ikarover 6 years ago
extracted from ansible:
• you need to clone in mirror mode: git clone --mirror URL
• and set second remote to the repo: git remote set-url --push origin BACKUP_URL
ikar
ikarover 6 years ago
you have to have a bare repo for that, maybe I'll find some doc...
ikar
ikarover 6 years ago
we use simple script for backup to AWS CodeCommit:
$ cat git_sync.sh 
#!/bin/bash

FAIL=true

cd /home/ubuntu/$1 && git fetch origin --prune && git push --mirror && FAIL=false

if $FAIL
then
        /usr/local/bin/slack.sh "WARNING: hourly repository sync *failed!!!*..." "#alerts"
fi
RB
RBover 6 years ago(edited)
wish we had a github backup for when they have issues. if we had something that synchronized all of our org, we could have our remotes all point to that which would redirect to github, but if github was having issues, it would point to its own cache until the issues get resolved.

does anything like that exist?
RB (pat leave again)
RB (pat leave again)over 6 years ago
@RB (pat leave again) has joined the channel
Zachary Loeber
Zachary Loeberover 6 years ago
github being down for me right now is a bummer. God help those pipelines that have code that manually goes out and pulls resources from it as a regular (bad) practice. Pointed reminder to keep your build/deploy base containers cached in your container repos.
Zachary Loeber
Zachary Loeberover 6 years ago
For those of you that mostly get gitflow but could use a visualization once in a while to grok the 10+ year old model that everyone seems smitten over: https://veerasundar.com/blog/2018/03/gitflow-animated/
Alan Jenkins
Alan Jenkinsover 6 years ago
@Alan Jenkins has joined the channel
Zachary Loeber
Zachary Loeberover 6 years ago
The way I'm understanding Go modules it appears that git tags are pretty much mandatory for any real projects, anyone care to tell me that is a misconception?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 6 years ago
Adding @U010XGY9B46 bot
Corey Gale
Corey Galeover 6 years ago
@Corey Gale has joined the channel
Jann Speyer
Jann Speyerover 6 years ago
@Jann Speyer has joined the channel
Joe Presley
Joe Presleyover 6 years ago
@Joe Presley has joined the channel
Zachary Loeber
Zachary Loeberover 6 years ago
Great article. It took some time for me come to some of the same realizations
grv
grvover 6 years ago
@grv has joined the channel
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 6 years ago
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 6 years ago
Yea, submodules are a red-herring. They look like the "perfect solution" to meld poly repos into one repo as necessary, only very few know how to use them in practice. I confess having used them many times, but always forget the syntax and always regret it after the fact. The Makefile with a target to check out the repos is just so much more straight forward! 😃
curious deviant
curious deviantover 6 years ago
@curious deviant has joined the channel