commitizen-action icon indicating copy to clipboard operation
commitizen-action copied to clipboard

Add `working-directory` argument

Open evetion opened this issue 4 years ago • 6 comments

So we can run this action in a different subdirectory in case of larger/mono repositories:

      - name: Create bump and changelog
        uses: commitizen-tools/commitizen-action@master
        with:
          github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
          working-directory: backend  <--

evetion avatar Mar 24 '21 13:03 evetion

Interesting. How would this work? Would you have to re-use the same action for multiple directories?

woile avatar Mar 24 '21 13:03 woile

Interesting question, I guess you would. My current changes: diff-fork just change the working directory so it can find the pyproject.toml stored in our backend folder. Let me know if you'd like that as a PR.

evetion avatar Mar 31 '21 07:03 evetion

I missed this, feel free to open a PR. Is it working for you this way?

Could you add some documentation over this workflow? Thanks!

woile avatar Dec 16 '21 16:12 woile

See https://github.community/t/best-practices-for-adding-reusable-workflows-to-actions/246224 for another use case for this feature (essentially arguing the case for working-directory being globally supported, but for now it would be handy to have in Commitizen).

Kurt-von-Laven avatar Apr 21 '22 00:04 Kurt-von-Laven

Is this feature still desired?

woile avatar Mar 03 '23 09:03 woile

Yeah, would be great to have it on board!

pietzschke avatar Nov 14 '23 13:11 pietzschke