fix(#120): detect VCS host for releases API and derive action-repo #122

Closed
rodin wants to merge 2 commits from issue-120 into feature/github-support
Showing only changes of commit db13078196 - Show all commits
+9 -4
View File
@@ -1,8 +1,8 @@
# Self-review workflow for strat/review-bot on GitHub Enterprise Server.
# Uses the composite action from this repo to validate that the action works
# correctly on GitHub (not just Gitea). This is the end-to-end integration test:
# a PR here will trigger the action, which must detect GitHub API format and
# download the binary correctly.
# Tests that the composite action runs correctly on GitHub runners:
# - GITHUB_SERVER_URL and GITHUB_REPOSITORY env vars are set correctly
# - Binary is downloaded from gitea.weiker.me (where releases live)
# - Review is posted to the corresponding Gitea PR
name: Review
on:
@@ -27,6 +27,10 @@ jobs:
- name: Run ${{ matrix.name }} review
Review

[NIT] The workflow uses the composite action from '.gitea/actions/review'. Since an equivalent exists in '.github/actions/review' and both are meant to be identical, consider referencing the .github path here for consistency when running on GitHub.

**[NIT]** The workflow uses the composite action from '.gitea/actions/review'. Since an equivalent exists in '.github/actions/review' and both are meant to be identical, consider referencing the .github path here for consistency when running on GitHub.
uses: ./.gitea/actions/review
with:
# Download binary from Gitea (releases live there, not on GHE)
Review

[MINOR] The self-test workflow uses ./.gitea/actions/review (the Gitea action path) even though it runs on GitHub. This means the GitHub runner will execute the .gitea/actions/review/action.yml file. This is intentional based on the comment ('Download binary from Gitea, post review to Gitea'), but it's slightly odd that the GitHub workflow uses the .gitea action path — the two action files are now identical, so it works, but it could confuse future maintainers who expect .github/workflows to use .github/actions.

**[MINOR]** The self-test workflow uses `./.gitea/actions/review` (the Gitea action path) even though it runs on GitHub. This means the GitHub runner will execute the `.gitea/actions/review/action.yml` file. This is intentional based on the comment ('Download binary from Gitea, post review to Gitea'), but it's slightly odd that the GitHub workflow uses the `.gitea` action path — the two action files are now identical, so it works, but it could confuse future maintainers who expect `.github/workflows` to use `.github/actions`.
gitea-url: https://gitea.weiker.me
# Post review to the corresponding Gitea repo
Outdated
Review

[MINOR] The self-test workflow uses ./.gitea/actions/review (line 32: uses: ./.gitea/actions/review) rather than ./.github/actions/review. On GitHub the runner will look for local composite actions under .github/, not .gitea/. While GitHub Actions does allow resolving .gitea/ paths in some environments, this is unexpected and could break on a standard GitHub or GHES runner that doesn't support the Gitea convention. The intent of this workflow is to validate the GitHub path, so it should reference ./.github/actions/review.

**[MINOR]** The self-test workflow uses `./.gitea/actions/review` (line 32: `uses: ./.gitea/actions/review`) rather than `./.github/actions/review`. On GitHub the runner will look for local composite actions under `.github/`, not `.gitea/`. While GitHub Actions does allow resolving `.gitea/` paths in some environments, this is unexpected and could break on a standard GitHub or GHES runner that doesn't support the Gitea convention. The intent of this workflow is to validate the GitHub path, so it should reference `./.github/actions/review`.
repo: rodin/review-bot
reviewer-token: ${{ secrets[matrix.token_secret] }}
reviewer-name: ${{ matrix.name }}
llm-model: ${{ matrix.model }}
@@ -39,4 +43,5 @@ jobs:
conventions-file: CONVENTIONS.md
patterns-repo: rodin/go-patterns
patterns-files: 'README.md,patterns/'
dry-run: 'true'
timeout: '600'