Skip to content

Coverage workflow on PR #548

Description

@FilippoOlivo

When a PR is opened from a forked repo to the mathLab/PINA, the coverage workflow fails. I leave here the reference of the error https://github.com/mathLab/PINA/actions/runs/14398808154/job/40379735408 .

Previous HEAD position was eacc3fc Merge 5454a82b4f9fef534adffc7d0d50756e54d6f7b9 into c71bc6421c2a436480bdf7d3e2e42fdd0df1d68d
Switched to a new branch '_xml_coverage_reports'
branch '_xml_coverage_reports' set up to track 'origin/_xml_coverage_reports'.
From https://github.com/mathLab/PINA
 * branch            _xml_coverage_reports -> FETCH_HEAD
Already up to date.
fatal: a branch named '_xml_coverage_reports' already exists
Copying data to /tmp/eacc3fce5642a5f334fd760e999d4538591029d9
Copying data from /tmp/eacc3fce5642a5f334fd760e999d4538591029d9
On branch _xml_coverage_reports
Your branch is up to date with 'origin/_xml_coverage_reports'.

nothing to commit, working tree clean
Run ad-m/github-push-action@master
Push to branch _xml_coverage_reports
remote: Permission to mathLab/PINA.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/mathLab/PINA.git/': The requested URL returned error: 403
Error: Invalid exit code: 128
    at ChildProcess.<anonymous> (/home/runner/work/_actions/ad-m/github-push-action/master/start.js:30:21)
    at ChildProcess.emit (node:events:524:28)
    at maybeClose (node:internal/child_process:1104:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  code: 128
}

Activity

  1. dario-coscia commented on Apr 11, 2025

    @dario-coscia
    Member

    I think the problem is that the bot is trying to push to branch _xml_coverage_reports from the fork, but since PINA repo has securcy blocks (i.e. only mantainer can push to a PINA branch, contributor can only PR) what happens is that the fork is not able to push

  2. dario-coscia commented on Apr 29, 2025

    @dario-coscia
    Member

    @ndem0 do you have any clue on how to fix this?

  3. dario-coscia commented on Sep 14, 2025

    @dario-coscia
    Member
  4. ndem0 commented on Oct 13, 2025

    @ndem0
    Member

    Fixed in mathLab@9d465fc.
    Changing the trigger event fixes the issue, since the Action has comments permission even triggered by forks with

    on:
      pull_request_target:
    
  5. reopened this on Oct 13, 2025
  6. linked a pull request that will close this issueDev updates #674on Oct 20, 2025
  7. linked a pull request that will close this issueAdd conditional coverage step for pull requests #866on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions