Is there a common way to identify `--changed-since...
# general
f
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
also, depending on the CI system used, thereā€™s usually some env var or so that points to the ā€œlast successfullā€ build..
f
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
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
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