https://pantsbuild.org/ logo
#general
Title
# general
f

famous-river-94971

01/12/2023, 8:28 PM
Is there a common way to identify
--changed-since
on
main
branches after a PR is merged? For example, with this workflow: 1. A PR is opened, we can use
--changed-since=origin/main
to detect everything that's new on the PR. 2. The PR is merged to
main
. We want to run a command with effectively the same files that "changed-since" on the PR, but we can't use
origin/main
anymore. A few thoughts in the 🧵
If we're guaranteed to use squash and merge, we can probably do
HEAD~1
I suppose I could also manually create a tag to indicate the point on
main
that the last successful deployment happened.
I'm coming from
lerna
and it automatically creates a "release commit" with tags that it uses internally to track this.
c

curved-television-6568

01/12/2023, 8:29 PM
also, depending on the CI system used, there’s usually some env var or so that points to the “last successfull” build..
f

famous-river-94971

01/12/2023, 8:30 PM
I'm on CircleCI. I don't recall seeing this in the past, but I can look to see - that's a good idea.
Maybe there's an API call I can make.
c

curved-television-6568

01/12/2023, 8:35 PM
was hoping for an easier answer, like for Jenkins, there’s a env var from the git plugin providing this in the env directly.. but as long as it’s doable 😉
👍 1
f

famous-river-94971

02/09/2023, 3:25 PM
I ended up recreating this with git tags on my own - just linking these threads together: https://pantsbuild.slack.com/archives/C046T6T9U/p1675956171363579?thread_ts=1675801304.389179&cid=C046T6T9U
4 Views