Fork me on GitHub

When one works alone, one can sometimes be ignorant that one is doing odd things. Example 1: Even when I had write privs to a GitHub repo, I'd work from a fork. I happened to notice @borkdude not working this way. And realized, doh, I could be working off branches in those GitHub repos. Example 2: For GitHub repos I maintain, I seem to only trigger CI tests when a user creates a PR and on a PR merge to the main branch. But again our @borkdude helped me to see that triggering CI tests on commits (from all forks and branches) will be helpful to folks to verify their work before submitting a PR. I'm not sure why I did not see these things, but whatevs, I see them now. Thanks @borkdude!

💜 12

Anyhoo, in addition to being thankful, 2nd reason for sharing is that maybe others are doing the same odd things as I was. Just trying to spread the learnings!

gratitude 1

Now... if I can just tell GitHub Actions to stop triggering a build for the same thing twice. It builds once for PR and another time for push. If I figure it out, I'll report back.

Björn Christensson20:03:38

@UE21H2HHD is it that when you open a PR, you don't want it to kick off twice?


Ya, I think I've got something working that avoids this now.

🎉 1
Björn Christensson20:03:52

I don't know much about gh workflow but I wonder if this is what is needed

    types: [opened, synchronize, reopened, ready_for_review]
☝️ here we might be able to skip out one of those... for instance.. do not add opened to to this list


but you do want to build PRs that are opened for branches from forks


I've removed synchronize and left in the default opened and reopened.


Yeah, for that we also trigger on push: . But the push: and the pull_request: synchronize triggered twice for the same commit.

👍 1

ok, let's hope this works


The experiments continue. I'll report back when I have extreme success.

Björn Christensson20:03:15

> extreme success Haha love that expression


Ya, been using that for a while, it often gets a smile!

Björn Christensson20:03:24

is that martin fowler extreme? I'll steel it anyways!


As in extreme programming? Nope. Just extra fantastic awesome success.

🙌 1
Björn Christensson20:03:25

Yep, that was where my programming brain went 😉


I guess, it could be Fowler/Beck extreme, if you want it to be. There are no rules.

Björn Christensson20:03:02

Sounds like a win!


Hey how arduous is it to setup a 2nd github org? I might want to test in the small with a forked repo. It is easy peasy lemon squeazy?


you can maybe abuse clj-easy for this


Ah, excellent idea.


And if I do reach extreme success we might leave it around to serve as one way to go about this.


Hmmm. A detail: Forgot (or did not realize) is that workflows are not automatically run on forks and have to be enabled.


> Ya, I think I've got something working that avoids this now. My idea did not work, will continue to explore.