Questions and notes from workshop day 3

Notes for day 3

Icebreaker :icecream:

If you could ask for any superpower (can be computer-related), what would you ask for?

In preparation for today, unless you are part of a team/classroom, have you opended an access request issue in access request github page? You will get an invitation via email. You need to accept the invitation. If you cannot find the email from GitHub, you may also find the invitation via this link.

Questions

:::info

Exercise until xx:50

https://coderefinery.github.io/git-collaborative/same-repository/#exercise The goal is to work together on one repository: create an issue, make a new branch and commit changes to it, then make a PR towards the main branch. Then other collaborators may merge your changes into the main branch. Please refer to Solution and hints if you are lost: https://coderefinery.github.io/git-collaborative/same-repository/#solution-and-hints

If you cannot see option to create a branch, please refresh the page. :::

Solution will be shown on stream

Questions continued:

:::info

Break until xx:22

Have a drink of your choice, walk around a bit, or any other way to relax :)

:::

After the break we continue with protected branches and a summary and another exercise

:::info

Exercise until xx:55

Link: https://coderefinery.github.io/git-collaborative/code-review/#practicing-code-review

Goal: Open a pull request with a mistake or typo, then find someone else's pull request and do a code review.

Step by step instructions you can follow are shown below the exercise box.

:::

Questions continued:

:::info

Lunch break until 13 CET / 14 EST

:::

How to contribute changes to repositories that belong to others

Now comes the fork :)

Questions continued:

:::info

Exercise until xx:44

Materials: https://coderefinery.github.io/git-collaborative/forking-workflow/#exercise

Goal: Create an issue, create a fork and branch in your fork, commit and submit a pull request to the original repository

We will do a demo after the exercise time. For technial issues, please join our zoom help room (link in e-mail)

Greetings from the zoom help room!

Status report: How is it going with the exercise?

:::

Questions continued:

How to approach other people’s repositories with ideas, changes, and requests

Here for example our lesson contribution guidelines for CodeRefinery: https://coderefinery.github.io/manuals/lesson-contribution/

:::info

Break until xx:12 ( a moment longer , we will be right back :) )

Stay hydrated!

Walk a little! Stretch your legs!

:::

General discussion on git collab - feel free to add your contributions

  1. In one sentence: what’s the biggest GitHub collaboration problem you’ve seen?

    • Figuring out what buttons to press
    • Merge conflicts
    • Hard to contribute to very advanced issues
  2. What makes a pull request effective—not just correct?

    • enough discussion before making changes
  3. How big is too big for a pull request?

    • more than one added utilities
    • more than 30 lines.
      • 10 lines: woudl you change this and that? are you sure abou the spelling?
      • 1000 lines: LGTM (= "looks good to me")
  4. What is the real purpose of code review on GitHub?

    • to avoid personal biases
    • to share responsibilities.
    • to teamwork
    • for quality control
  5. Who owns a pull request getting merged—the author or the reviewers?

    • both, imo
    • it is possible, on any commits, to have two differente people - and author and a commit. But does it makes sense to have a concept of "ownership" for a pull request?
    • mostly author, but depends on how the reviewing process goes
    • complicated one: if an author submits code that violates a license, are the maintainers of the repo (the reviewers) responsible too?
  6. How do you prevent PRs from getting stuck?

    • set deadline?
    • Issues can be attached to "Milestones", which have an expiry date, and PRs are usually attached to issues, so in a sense Milestones could help here.
    • in practice difficult, it largely replies on effective communications. I'd say at least try to leave comments in PRs even you don't have time to handle them soon.
    • some teams adopt the practice of "nonblocking code reviews" (if you are confident that the code works, because you've got enough tests and you know what you are doing, perhaps you can merge when time is a problem)
  7. Should GitHub block merges on failing CI, or allow overrides?”

    • I guess it depends on team's urgent objectives
    • Sometimes a CI pipeline has some tests that are tricky/flaky and may fail because of reasons that are out of control. The probability of this happening approaches 1 if the pipeline is complicated enough (and complexity is not correctly managed).
  8. Squash, merge commit, or rebase—what do you enforce and why?

    • squash + rebase is cool because it's clean, but it can be complicated (rebase works ok for small PRs)
    • rebase keeps logs shorter (good for small PRs), but conflicts can be harder to solve and merging is just easier
  9. What’s your protocol when something goes wrong—bad merge, broken main, force push?

    • create a fix-branch
    • use the reflog and create "bookmark" branches (then maybe you have to force push)
  10. What’s one GitHub collaboration practice you changed your mind about?

    • Raise issues before doing further actions
    • Atomic commits
    • CI
    • ..

Questions continued:

Day 3 wrapup and feedback

::: success News for day 3 We covered everything as scheduled. Get excited for part 2! :::

Today was (vote for all that apply):

too fast: too slow: o right speed: oooooooooooooooooo too slow sometimes, too fast other times: too advanced:o too basic: right level: oooooooooooooooooo I will use what I learned today: ooooooooooooooooo I would recommend today to others: ooooooooooooo I would not recommend today to others:

One good thing about today:

One thing to improve for next time:

Any other feedback?

General questions continued:


Funding

CodeRefinery is a project within the Nordic e-Infrastructure Collaboration (NeIC).

Privacy

Privacy policy

Follow us

Contact

support@coderefinery.org

Improve this page

Source code