Skip to content

Trigger conflict-detection on push on main#14479

Merged
koppor merged 19 commits into
mainfrom
add-rerun
Dec 1, 2025
Merged

Trigger conflict-detection on push on main#14479
koppor merged 19 commits into
mainfrom
add-rerun

Conversation

@koppor

@koppor koppor commented Nov 30, 2025

Copy link
Copy Markdown
Member

Triggered by following output:

grafik

I think, a daily check is enough - to not pollute our actions run list

When action runs:

grafik

Then for each trigger:

grafik

If there is a conflict:

grafik

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • [/] I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • [/] I added screenshots in the PR description (if change is visible to the user)
  • [/] I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • [/] I checked the user documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

Comment thread .github/workflows/rerun-merge-conflict-check.yml Fixed
Comment on lines +10 to +28
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
show-progress: 'false'
- name: Trigger "On PR opened/updated (check)" for all open PRs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
workflow_name="On PR opened/updated (check)"

gh pr list --state open --json number,headRefName --jq '.[] | "\(.number) \(.headRefName)"' |
while read pr branch; do
echo "Triggering '$workflow_name' for PR #$pr on ref '$branch'"

gh workflow run "$workflow_name" \
--ref "$branch" \
--field pr_number="$pr"
done

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 6 months ago

To fix the issue, explicitly define a permissions block at the appropriate level (workflow root or relevant job). Since the job uses gh workflow run, it likely needs workflows: write, and possibly contents: read to run at all. The safest minimal fix is to add a permissions: section at the root of the workflow, limiting contents to read, and granting workflows: write. This way, all jobs (including the lone rerun job) will inherit these permissions unless otherwise specified. You should add the following lines after the name: field and before the on: field (per GitHub workflow conventions):

permissions:
  contents: read
  workflows: write
Suggested changeset 1
.github/workflows/rerun-merge-conflict-check.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/rerun-merge-conflict-check.yml b/.github/workflows/rerun-merge-conflict-check.yml
--- a/.github/workflows/rerun-merge-conflict-check.yml
+++ b/.github/workflows/rerun-merge-conflict-check.yml
@@ -1,4 +1,7 @@
 name: Rerun PR merge conclicts check
+permissions:
+  contents: read
+  workflows: write
 
 on:
   push:
EOF
@@ -1,4 +1,7 @@
name: Rerun PR merge conclicts check
permissions:
contents: read
workflows: write

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
@koppor koppor committed this autofix suggestion 6 months ago.
@koppor koppor marked this pull request as ready for review December 1, 2025 00:33
@koppor

koppor commented Dec 1, 2025

Copy link
Copy Markdown
Member Author

We need to try out in main.

This needs to go in quickly as it fixes the workflow name, too.

@koppor koppor merged commit c90dc14 into main Dec 1, 2025
95 of 103 checks passed
@koppor koppor deleted the add-rerun branch December 1, 2025 12:10
Siedlerchr added a commit to EricW123/jabref that referenced this pull request Dec 1, 2025
…ue676

* upstream/main: (227 commits)
  Adapt welcome message (JabRef#14487)
  Add message when closing a PR
  Add collection of "all" AI features (JabRef#14438)
  Trigger conflict-detection on push on main (JabRef#14479)
  Add unassigned_comment on comment issue
  New Crowdin updates (JabRef#14483)
  Tweak labels also at merge conflicts
  Merge --remove-label and --add-label
  Remove SmartGroup and refactor groups factory (JabRef#14398)
  more debug
  Support html when parsing arXiv identifiers (JabRef#14474)
  Add debug and fix run
  Remove "ready-for-review" if changes are required
  Have label move as last step of comment
  Add pr number to output
  change files to file(s) (JabRef#14465)
  Add CDS archive (JabRef#14476)
  Fix adapting labels (JabRef#14477)
  Chore(deps): Bump jablib/src/main/resources/csl-styles (JabRef#14468)
  Chore(deps): Bump net.bytebuddy:byte-buddy in /versions (JabRef#14472)
  ...
Siedlerchr added a commit to tejjgv/jabref that referenced this pull request Dec 2, 2025
* upstream/main: (102 commits)
  Adapt welcome message (JabRef#14487)
  Add message when closing a PR
  Add collection of "all" AI features (JabRef#14438)
  Trigger conflict-detection on push on main (JabRef#14479)
  Add unassigned_comment on comment issue
  New Crowdin updates (JabRef#14483)
  Tweak labels also at merge conflicts
  Merge --remove-label and --add-label
  Remove SmartGroup and refactor groups factory (JabRef#14398)
  more debug
  Support html when parsing arXiv identifiers (JabRef#14474)
  Add debug and fix run
  Remove "ready-for-review" if changes are required
  Have label move as last step of comment
  Add pr number to output
  change files to file(s) (JabRef#14465)
  Add CDS archive (JabRef#14476)
  Fix adapting labels (JabRef#14477)
  Chore(deps): Bump jablib/src/main/resources/csl-styles (JabRef#14468)
  Chore(deps): Bump net.bytebuddy:byte-buddy in /versions (JabRef#14472)
  ...
shubhamk0205 pushed a commit to shubhamk0205/jabref that referenced this pull request Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants