Skip to content

Commit

Permalink
chore: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
itsyoboieltr committed Jan 10, 2025
1 parent b2c5314 commit e1b6931
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test-lint-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ jobs:
uses: metamask/github-tools/.github/actions/setup-environment@main

- name: Validate changelog
# For a `pull_request` event, the branch is `github.head_ref``.
# For a `push` event, the branch is `github.ref_name`.
if: ${{ !startsWith(github.head_ref || github.ref_name, 'Version-v') }}
run: yarn lint:changelog

- name: Validate release candidate changelog
# For a `pull_request` event, the branch is `github.head_ref``.
# For a `push` event, the branch is `github.ref_name`.
if: ${{ startsWith(github.head_ref || github.ref_name, 'Version-v') }}
run: .circleci/scripts/validate-changelog-in-rc.sh
11 changes: 6 additions & 5 deletions .github/workflows/wait-for-circleci-workflow-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ jobs:
env:
OWNER: ${{ github.repository_owner }}
REPOSITORY: ${{ github.event.repository.name }}
# For a `pull_request` event, the branch is `github.head_ref``.
# For a `push` event, the branch is `github.ref_name`.
BRANCH: ${{ github.head_ref || github.ref_name }}
# For a `push` event, the HEAD commit hash is `github.sha`.
# For a `pull_request` event, `github.sha` is instead the base branch commit hash. The
# HEAD commit hash is `pull_request.head.sha`.
# For a `pull_request` event, the head commit hash is `github.event.pull_request.head.sha`.
# For a `push` event, the head commit hash is `github.sha`.
HEAD_COMMIT_HASH: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
pipeline_id=$(curl --silent "https://circleci.com/api/v2/project/gh/$OWNER/$REPOSITORY/pipeline?branch=$BRANCH" | jq -r ".items | map(select(.vcs.revision == \"${HEAD_COMMIT_HASH}\" )) | first | .id")
echo "Waiting for pipeline '${pipeline_id}' for commit hash '${HEAD_COMMIT_HASH}'"
pipeline_id=$(curl --silent "https://circleci.com/api/v2/project/gh/$OWNER/$REPOSITORY/pipeline?branch=$BRANCH" | jq --arg head_commit_hash "${HEAD_COMMIT_HASH}" -r '.items | map(select(.vcs.revision == $head_commit_hash)) | first | .id')
echo "Waiting for pipeline '${pipeline_id}', commit hash '${HEAD_COMMIT_HASH}'"
workflow_status=$(curl --silent "https://circleci.com/api/v2/pipeline/$pipeline_id/workflow" | jq -r ".items[0].status")
if [ "$workflow_status" == "running" ]; then
Expand Down

0 comments on commit e1b6931

Please sign in to comment.