Skip to content

Commit

Permalink
Fix news
Browse files Browse the repository at this point in the history
1. stuff gets merged into the git main branch
2. git records two parents to each merge, the main branch (first), and
   the branch it's coming fro (second)
3. and if you do git log by default you'll get... a mishmash of
   everything? And our since 24 hours ago seems to find commits on this
   branch that's getting merged in
4. we took the before-oldest 24h old commit for that, which happened to
   be ancient, I think
5. and then when we did git diff of course it picked up commits from the
   most recently merged branch which had been branched loooong ago,
   before all of those tutorials were added
6. so we did git diff that to main and got a long list of changed files
   that weren't 'true'
7. I think adding --first-parent will ensure that it'll pick the right
   commit on the right branch to compare to
  • Loading branch information
hexylena committed Dec 14, 2023
1 parent 592f7fc commit 8e868f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

- name: Send announcements to matrix
run: |
commit=$(git log --since "24 hours ago" --format=%H | tail -n 1)
commit=$(git log --since "24 hours ago" --format=%H --first-parent main| tail -n 1)
bundle exec ruby bin/news.rb -p "${commit}~1" --matrix-post
env:
MATRIX_ACCESS_TOKEN: ${{ secrets.matrix_access_token }}

0 comments on commit 8e868f5

Please sign in to comment.