Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changelog test (bsc#1231235) #3

Closed
wants to merge 2 commits into from
Closed
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
13 changes: 7 additions & 6 deletions .github/workflows/changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types: [opened, edited, synchronize, reopened, closed]
# Only execute on the main branches (feature branches are excluded)
branches:
- changelog-action
- master
# Uyuni patches
- 'Uyuni-[0-9]+.[0-9]+'
Expand Down Expand Up @@ -49,7 +50,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
- id: master
name: Get modified master changelog files
uses: Ana06/[email protected]
Expand All @@ -67,23 +68,23 @@ jobs:
echo
echo "See https://github.com/uyuni-project/uyuni/wiki/Contributing for a guide to writing changelogs."
exit 1
- id: changelogs
name: Get modified files
if: "!contains(github.event.pull_request.body, '[x] No changelog needed')"
uses: Ana06/[email protected]
- name: Test changelog entries
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BZ_TOKEN: ${{ secrets.BUGZILLA_TOKEN }}
run: |
pip install python-bugzilla~=3.2.0

CHANGED_FILES=$(git diff --name-only \
${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }})

# Tracker file can be retrieved from the OBS/IBS API
# by calling 'osc api /issue_trackers/' (with authentication)
python .github/workflows/changelogs/changelogs.py \
--tracker-file .github/workflows/changelogs/trackers.xml \
--git-repo uyuni-project/uyuni \
--pr-number ${{ github.event.pull_request.number }} \
${{ steps.changelogs.outputs.all }}
$CHANGED_FILES

# Warns the user if they merged the PR, but the changelog test failed
warn_user_if_merged:
Expand Down
Empty file added java/myfile
Empty file.
21 changes: 21 additions & 0 deletions java/spacewalk-java.changes.asd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- My changelog entry
- My very long changelog entry. My very long changelog entry. My very long changelog entry. My very long changelog entry.

Check failure on line 2 in java/spacewalk-java.changes.asd

View workflow job for this annotation

GitHub Actions / Changelog tests

Line exceeds 67 characters in file java/spacewalk-java.changes.asd#L2
- This is a
multi-line entry
- This is a multi-line entry
with wrong indentation

Check failure on line 6 in java/spacewalk-java.changes.asd

View workflow job for this annotation

GitHub Actions / Changelog tests

Wrong indentation in file java/spacewalk-java.changes.asd#L6

Check failure on line 7 in java/spacewalk-java.changes.asd

View workflow job for this annotation

GitHub Actions / Changelog tests

Empty line in file java/spacewalk-java.changes.asd#L7
- Another entry
- Entry with wrong indentation

Check failure on line 9 in java/spacewalk-java.changes.asd

View workflow job for this annotation

GitHub Actions / Changelog tests

Wrong indentation in file java/spacewalk-java.changes.asd#L9
- Entry with multiple whitespaces

Check failure on line 10 in java/spacewalk-java.changes.asd

View workflow job for this annotation

GitHub Actions / Changelog tests

Multiple whitespaces in file java/spacewalk-java.changes.asd#L10
- Mistyped tracker here (bsv#1231231)

Check warning on line 11 in java/spacewalk-java.changes.asd

View workflow job for this annotation

GitHub Actions / Changelog tests

Possibly a mistyped tracker in file java/spacewalk-java.changes.asd#L11
- not capitalized

Check failure on line 12 in java/spacewalk-java.changes.asd

View workflow job for this annotation

GitHub Actions / Changelog tests

Wrong capitalization in file java/spacewalk-java.changes.asd#L12
- This is a multi-line
entry with wrong
spacing after punctuation,characters

Check failure on line 15 in java/spacewalk-java.changes.asd

View workflow job for this annotation

GitHub Actions / Changelog tests

Wrong spacing in file java/spacewalk-java.changes.asd#L13-15
- Yet another entry
- Another mistyped tracker (sc#1231231)

Check warning on line 17 in java/spacewalk-java.changes.asd

View workflow job for this annotation

GitHub Actions / Changelog tests

Possibly a mistyped tracker in file java/spacewalk-java.changes.asd#L17
- Entry with trailing whitespaces

Check failure on line 18 in java/spacewalk-java.changes.asd

View workflow job for this annotation

GitHub Actions / Changelog tests

Trailing whitespaces in file java/spacewalk-java.changes.asd#L18
- This is a multi-line
entry. with wrong
capitalization after a full stop.

Check failure on line 21 in java/spacewalk-java.changes.asd

View workflow job for this annotation

GitHub Actions / Changelog tests

Wrong capitalization in file java/spacewalk-java.changes.asd#L19-21
5 changes: 5 additions & 0 deletions java/spacewalk-java.changes.asd2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- My bugfix (bsc#1231231) with a multi-line
changelog entry
- Valid bug tracker (bsc#1216509)
- Valid bug trackers (bsc#1215813, bsc#1214463)
- Another valid bug tracker, according to IBS/OBS trackers (bnc#1216509)

Check failure on line 5 in java/spacewalk-java.changes.asd2

View workflow job for this annotation

GitHub Actions / Changelog tests

Line exceeds 67 characters in file java/spacewalk-java.changes.asd2#L5
Empty file added web/myfile
Empty file.
Empty file added web/spacewalk-web.changes.ax
Empty file.
Loading