Skip to content

Commit

Permalink
Merge branch 'JabRef:main' into fix-for-issue-348
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanan20020 authored Oct 26, 2023
2 parents 16166d1 + afb9e76 commit bcd41a6
Show file tree
Hide file tree
Showing 80 changed files with 1,032 additions and 440 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The title of the PR must not reference an issue, because GitHub does not support
-->

### Mandatory checks

- [ ] Change in `CHANGELOG.md` described in a way that is understandable for the average user (if applicable)
- [ ] Tests created for changes (if applicable)
- [ ] Manually tested changed features in running JabRef (always required)
Expand Down
5 changes: 0 additions & 5 deletions .github/failure-csl-update.md

This file was deleted.

11 changes: 7 additions & 4 deletions .github/workflows/add-to-projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
issues:
types: [labeled]

permissions:
issues: write

jobs:
add-to-project:
runs-on: ubuntu-latest
Expand All @@ -12,28 +15,28 @@ jobs:
- name: "good first issue"
if: "${{ github.event.label.name == 'good first issue' }}"
env:
GH_TOKEN: ${{ secrets.PROJECT_TOKEN }}
GH_TOKEN: ${{ github.token }}
run: |
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH")
gh project item-add 5 --owner jabref --url $ISSUE_URL
- name: needs-refinement
if: github.event.label.name == 'needs-refinement'
env:
GH_TOKEN: ${{ secrets.PROJECT_TOKEN }}
GH_TOKEN: ${{ github.token }}
run: |
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH")
gh project item-add 15 --owner jabref --url $ISSUE_URL
- name: "status: freeze"
if: "${{ github.event.label.name == 'status: freeze' }}"
env:
GH_TOKEN: ${{ secrets.PROJECT_TOKEN }}
GH_TOKEN: ${{ github.token }}
run: |
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH")
gh project item-add 9 --owner jabref --url $ISSUE_URL
- name: ui
if: "${{ github.event.label.name == 'ui' }}"
env:
GH_TOKEN: ${{ secrets.PROJECT_TOKEN }}
GH_TOKEN: ${{ github.token }}
run: |
ISSUE_URL=$(jq --raw-output .issue.html_url "$GITHUB_EVENT_PATH")
gh project item-add 8 --owner jabref --url $ISSUE_URL
14 changes: 10 additions & 4 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ jobs:
runs-on: ubuntu-latest
# Run only if PR is inside JabRef's main repository and created by dependabot or by an update workflow
if: >
(github.repository == 'JabRef/jabref') &&
((github.actor == 'dependabot[bot]') ||
((startsWith(github.event.pull_request.title, '[Bot] ') || (startsWith(github.event.pull_request.title, 'Bump '))) &&
(github.event.pull_request.head.repo.full_name == 'JabRef/jabref')))
(github.repository == 'JabRef/jabref') &&
(github.event.pull_request.head.repo.full_name == 'JabRef/jabref') &&
(
(github.actor == 'dependabot[bot]') ||
(
startsWith(github.event.pull_request.title, '[Bot] ') ||
startsWith(github.event.pull_request.title, 'Bump ') ||
startsWith(github.event.pull_request.title, 'New Crowdin updates')
)
)
steps:
- name: Approve PR
run: gh pr review --approve "$PR_URL"
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ jobs:
# tbn = to-be-notarized
name: JabRef-macOS-tbn
path: build/distribution
- name: Upload to GitHub workflow artifacts store
if: (steps.checksecrets.outputs.secretspresent != 'YES')
uses: actions/upload-artifact@v3
with:
# tbn = to-be-notarized
name: JabRef-${{ matrix.os }}
path: build/distribution
announce:
name: Comment on pull request
runs-on: ubuntu-latest
Expand All @@ -242,7 +249,7 @@ jobs:
env:
BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }}
- name: Comment PR
if: steps.checksecrets.outputs.secretspresent == 'YES'
if: (steps.checksecrets.outputs.secretspresent == 'YES')
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Expand Down
71 changes: 61 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ concurrency:
group: tests-${{ github.head_ref }}
cancel-in-progress: true

permissions:
pull-requests: write

jobs:
checkstyle:
name: Checkstyle
Expand Down Expand Up @@ -123,28 +126,76 @@ jobs:
You can check the detailed error output at the tab "Checks", section "Tests" (on the left), subsection "Modernizer".
comment_tag: modernizer
markdown-checks:
name: Markdown style check
markdown:
name: Markdown
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: 'false'
show-progress: 'false'
- name: Run markdown-lint
uses: avto-dev/markdown-lint@v1
- name: markdownlint-cli2-action
uses: DavidAnson/markdownlint-cli2-action@v13
with:
args: CHANGELOG.md CONTRIBUTING.md README.md
config: '.markdownlint.yml'
globs: |
*.md
docs/**/*.md
- name: Add comment on pull request
if: ${{ failure() }}
uses: thollander/actions-comment-pull-request@v2
with:
message: >
You modified Markdown (*.md) files.
To ensure consistent styling, we have [markdown-lint](https://github.com/DavidAnson/markdownlint) in place.
[Markdown lint's rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#rules) help to keep our Markdown files consistent within this repository and consistent with the Markdown files outside here.
You can check the detailed error output at the tab "Checks", section "Tests" (on the left), subsection "Markdown".
comment_tag: markdown
changelog-non-frozen:
name: CHANGELOG.md
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: 'false'
show-progress: 'false'
fetch-depth: 0
- name: Lint CHANGELOG.md
run: |
set -e
# Install jbang
curl -Ls https://sh.jbang.dev | bash -s - app setup
source ~/.zshrc
jbang .github/heylogs.java check CHANGELOG.md | tee heylogs.txt
# We have 2 "valid" issue in CHANGELOG.md
export PATH=$PATH:$HOME/.jbang/bin
# ensure that refs are available
BRANCH=`git rev-parse HEAD`
git checkout main
# run heylogs verification
jbang --repos jitpack,central -m nbbrd.heylogs.cli.HeylogsCommand com.github.koppor.heylogs:heylogs-cli:jitpack-SNAPSHOT check CHANGELOG.md --gitdiff main...$BRANCH > heylogs.txt || true
# improve output
sed -i 's/consistent-separator/consistent-separator (ignored)/' heylogs.txt
sed -i 's/all-h2-contain-a-version/all-h2-contain-a-version (ignored)/' heylogs.txt
cat heylogs.txt
# exit 1 in case of error
# We have 2 "valid" issues in CHANGELOG.md
grep -q "2 problems" heylogs.txt || exit 1
- name: Add comment on pull request
if: ${{ failure() }}
uses: thollander/actions-comment-pull-request@v2
with:
message: >
While the PR was in progress, JabRef released a new version.
You have to merge `upstream/main` and move your entry in `CHANGELOG.md` to section `## [Unreleased]`.
It might also be that another CHANGELOG.md issue arose.
You can check the detailed error output at the tab "Checks", section "Tests" (on the left), subsection "CHANGELOG.md".
comment_tag: changelog
tests:
name: Unit tests
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit bcd41a6

Please sign in to comment.