launchdarkly / ld-find-code-refs

Build tool for automatically sending feature flag code references to LaunchDarkly
https://launchdarkly.com
Other
46 stars 34 forks source link

Any example of demoing the flow of using `extinctions` #241

Closed chenrui333 closed 2 years ago

chenrui333 commented 2 years ago

I have just did a simple integration with most my repos, it looks like below:

      - name: Scan flags
        run: |
          ld-find-code-refs \
            --accessToken=${LD_ACCESS_TOKEN} \
            --projKey=default \
            --repoName=${REPO} \
            --dir="."

I got asked with this warning message in the action run WARNING: 2022/04/14 18:41:33 coderefs.go:189: unable to generate flag extinctions: object not found

How I can update the action workflow to improve the ld-find-code-refs usage, thanks!

carmenquan commented 2 years ago

Hi @chenrui333, thank you for reaching out. The error that you're seeing is being returned from git-go https://github.com/go-git/go-git/blob/master/plumbing/object.go#L10 and could indicate an issue with the repository you're running code refs on. I'm happy to investigate more if you can provide more details, or a link to the repo that you're working with.

chenrui333 commented 2 years ago

I wonder if that is more related to the git HEAD checkout. I will share more info via a support ticket. Thanks!

chenrui333 commented 2 years ago

The issue is resolved after setting up

      - uses: actions/checkout@v3
        with:
          fetch-depth: 11 # This value must be set if the lookback configuration option is not disabled for find-code-references. Read more: https://github.com/launchdarkly/ld-find-code-refs#searching-for-unused-flags-extinctions