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
13 changes: 11 additions & 2 deletions .github/actions/check-todo/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,20 @@ if [ $# -gt 0 ]; then
shift
fi

git diff --name-only "$BASE_REF...$BRANCH_REF" | grep -E '[.](php|phpt|vue|js)$' | while read line
echo "Base Reference: $BASE_REF"
echo "Head Reference: $BRANCH_REF"

files="$(git diff --name-only "$BASE_REF...$BRANCH_REF")"

echo '::group::Updated files'
echo "$files"
echo '::endgroup::'

echo "$files" | grep -E '[.](php|phpt|vue|js)$' | while read line
do
file=$(echo "$line" | sed 's@^\./@@')

grep -noE '(TODO|ToDo|@todo|XXX|FIXME|FixMe)([^a-zA-Z].*)?$' "$line" | while read match
grep -noE '(TODO|ToDo|@todo|XXX|FIXME|FixMe)([^a-zA-Z0-9].*)?$' "$line" | while read match
do
IFS=: read lineno msg <<< "$match"
echo "::warning file=$file,line=$lineno::Found $msg"
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/pull-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,24 @@ jobs:
name: Check for added todo messages
runs-on: ubuntu-latest
steps:
- name: Manual checkout of the app
- name: Git version output
run: git version
- name: Manual checkout of the app (base repo)
run: |
REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
BRANCH="${GITHUB_REF/#refs\/heads\//}"

git version

git clone --filter=tree:0 "$REPO" .
git checkout ${{ github.head_ref }}
- name: Manual checkout of the app (PR head)
run: |
git remote add head "${{ github.event.pull_request.head.repo.html_url }}"
git fetch head --filter=tree:0

git checkout -b head-branch head/${{ github.head_ref }}
- name: Status of current git workspace
run: |
git branch
git status
- name: Check for open TODO annotations in source code
uses: ./.github/actions/check-todo

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
- Update eslint-plugin-vue
- Fix refresh-icon overlays name of recipe
[#1033](https://github.com/nextcloud/cookbook/pull/1033) @MarcelRobitaille
- Reenable PR checks from foreign forks
[#1045](https://github.com/nextcloud/cookbook/pull/1045) @christianlupus

### Codebase maintenance
- Removed codecov.io upload of intermediate merge commits during pull requests [#1028](https://github.com/nextcloud/cookbook/issues/1028)
Expand Down