Skip to content

Commit

Permalink
step-6
Browse files Browse the repository at this point in the history
Signed-off-by: jagpreetsinghsasan <[email protected]>
  • Loading branch information
jagpreetsinghsasan committed Jul 15, 2024
1 parent 35e672a commit 4523e45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
PULL_REQ_TITLE: ${{ github.event.pull_request.title }}
PULL_REQ_BODY: ${{ github.event.pull_request.body }}
run: |
./tools/pr-commit-parity.sh "GITHUB_REPO" "$GITHUB_ACTION_SCOPED_AUTH_TOKEN" "PULL_REQ_URL" "$PULL_REQ_TITLE" "$PULL_REQ_BODY"
- name: Commit message list
run: cat COMMIT_MESSAGES.txt
PR_COMMIT_PARITY_OUTPUT=$(./tools/pr-commit-parity.sh "GITHUB_REPO" "$GITHUB_ACTION_SCOPED_AUTH_TOKEN" "PULL_REQ_URL" "$PULL_REQ_TITLE" "$PULL_REQ_BODY")
echo "PR_COMMIT_PARITY_OUTPUT=$PR_COMMIT_PARITY_OUTPUT" >> "$GITHUB_OUTPUT"
- name: List all the packages affected by diff
run: echo "The output is ${{ steps.get-affected-packages-from-diff.outputs.PR_COMMIT_PARITY_OUTPUT }}"
4 changes: 1 addition & 3 deletions tools/pr-commit-parity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

PULL_REQ_NUMBER=$(echo "$3" | grep -oP '\d+$')
GITHUB_API_COMMIT_IDS_URL="https://api.github.com/repos/$1/pulls/${PULL_REQ_NUMBER}/commits"

COMMIT_MESSAGES=$(curl -sSL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "${API_URL}" | jq -r '.[].commit.message')
COMMITS_JSON=$(curl $GITHUB_API_COMMIT_IDS_URL)

PULL_REQ_TITLE=$(echo -e "$4")
PULL_REQ_BODY=$(echo -e "$5")

echo "$COMMIT_MESSAGES" > COMMIT_MESSAGES.txt

0 comments on commit 4523e45

Please sign in to comment.