Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/gitlint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
git config --global --add safe.directory /github/workspace && \
git fetch origin +refs/heads/main:refs/remotes/origin/main && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you also need to fetch that base branch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicu1989 why don't we use something generic like this instead of input variables?

TARGET_BRANCH="${{ github.event.pull_request.base.ref || github.ref_name }}"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this action cannot access to the github.* context at execution time

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, because it's a docker action.
So as long as the default works we can keep it as is.
But if we need better support of e.g. auto detecting branches, then we should convert this to a composite action?!
(or javascript action if someone is bored)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah composite action should work with github context. my remark was to update the fetch as well since the author changed the gitlint command from default main to input.base-branch

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge this now as the PR is an improvement, even if incomplete

git fetch origin +refs/pull/${{ inputs.pr-number }}/head && \
if ! gitlint --commits origin/main..HEAD; then \
if ! gitlint --commits ${{ inputs.base-branch }}..HEAD; then \
echo -e "\nWARNING: Your commit message does not follow the required format." && \
echo "Formatting rules: https://eclipse-score.github.io/score/process/guidance/git/index.html" && \
echo -e "To fix your commit message, run:\n" && \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ jobs:
id-token: write

with:
bazel-target: "//docs:github_pages"
# the bazel-target depends on your repo specific docs_targets configuration (e.g. "suffix")
bazel-target: "//docs:incremental -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}"
retention-days: 3
1 change: 0 additions & 1 deletion .github/workflows/gitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ jobs:
uses: ./.github/actions/gitlint
with:
pr-number: ${{ github.event.number }}
base-branch: ${{ github.event.pull_request.base.ref }}
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module(
version = "1.0",
)

bazel_dep(name = "rules_python", version = "1.0.0")
bazel_dep(name = "rules_python", version = "1.4.1")

PYTHON_VERSION = "3.12"

Expand Down Expand Up @@ -62,4 +62,4 @@ bazel_dep(name = "aspect_rules_lint", version = "1.0.3")
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1")

#docs-as-code
bazel_dep(name = "score_docs_as_code", version = "0.2.4")
bazel_dep(name = "score_docs_as_code", version = "0.3.3")
Loading