Skip to content

Commit

Permalink
squash! Use gh CLI to get the PR diff
Browse files Browse the repository at this point in the history
  • Loading branch information
cbbayburt committed Nov 24, 2024
1 parent cbd2730 commit 05a8027
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,19 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
fetch-depth: 1
ref: "${{ github.event.pull_request.head.sha }}"
# - name: Clone PR head branch
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# HEAD_REPO: ${{ github.event.pull_request.head.repo.clone_url }}
# HEAD_BRANCH: ${{ github.event.pull_request.head.ref }}
# run: |
# echo "Cloning head branch from $HEAD_REPO"
# git clone --depth 2 --branch $HEAD_BRANCH $HEAD_REPO .
# echo $(pwd)
# ls -R .
# git log -1
- id: master
name: Get modified master changelog files
uses: Ana06/get-changed-files@v2.3.0
Expand All @@ -68,17 +80,26 @@ jobs:
echo
echo "See https://github.com/uyuni-project/uyuni/wiki/Contributing for a guide to writing changelogs."
exit 1
- id: files
name: Get changed files
uses: Ana06/get-changed-files@v2.3.0
- name: Test changelog entries
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BZ_TOKEN: ${{ secrets.BUGZILLA_TOKEN }}
run: |
pip install python-bugzilla~=3.2.0
echo 2
CHANGED_FILES=$(gh pr diff -R ${{ github.event.pull_request.base.repo.full_name }} \
${{ github.event.pull_request.number }} --name-only)
echo $CHANGED_FILES
echo "Normal"
echo "Changed files:"
echo ${{ steps.files.outputs.added_modified }}
# Tracker file can be retrieved from the OBS/IBS API
# by calling 'osc api /issue_trackers/' (with authentication)
python .github/workflows/changelogs/changelogs.py -v \
Expand Down

0 comments on commit 05a8027

Please sign in to comment.