sclorg / testing-farm-as-github-action

GitHub Action to execute tests by Testing Farm and update Pull Request status
MIT License
13 stars 11 forks source link

Get `git_url` and `git_ref` from the current repo #185

Closed LecrisUT closed 2 months ago

LecrisUT commented 4 months ago

There are variables like ${{ github.ref }}/$GITHUB_REF (and more specific ones within action toolkit) to automatically extract the git repo.

Preferably it should use the results from actions/checkout, but that may be difficult given the current testing-farm api :/

zmiklank commented 4 months ago

Hi. I would say this approach is not the only one, or even default one that the user of tfaga can choose. We, in sclorg, do not set in our tfaga workflows git_url or git_ref based on information from cloned repository. We have tmt plans stored separately.

So that would require adding another input for setting if we want to use git_ref and git_url from current repo. In my opinion is therefore more efficient to use explicitly the inputs we already have.

Please correct me, if otherwise.

LecrisUT commented 4 months ago

What I was meaning to suggest is defaults, i.e. default all the values to either ${{ github.ref }} (if possible) or default them to empty and within the JS code, if they are empty fill in the defaults from the action-toolkit. This would not impact other users, but it would make the first-party user (one with tmt tree in the upstream repo) have less to research on how to set it up for push, pull, etc.

zmiklank commented 4 months ago

Oh, sure, I understand now, thanks.