[Bug] Spurious `remote: error: GH013: Repository rule violations found for refs/heads/trunk.` `remote: - Code scanning is waiting for results from CodeQL for the commit`
- Langage dominant
- CodeQL
- Étoiles
- 10.1k
- Forks
- 2.1k
- Merge moyen
- 2 j 15 h
- PR mergées (30 j)
- 141
Description
**Description of the false positive**
```
remote: error: GH013: Repository rule violations found for refs/heads/trunk.
remote: Review all repository rules at https://github.com/SwuduSusuwu/SusuLib/rules?ref=refs%2Fheads%2Ftrunk
remote:
remote: - Code scanning is waiting for results from CodeQL for the commit 493026f.
remote:
To ssh://github.com/SwuduSusuwu/SusuLib.git
! [remote rejected] a32d469e~4 -> trunk (push declined due to repository rule violations)
error: failed to push some refs to 'ssh://github.com/SwuduSusuwu/SusuLib.git'
```
**Code samples or links to source code**
This is not related to particular source code. It happens at random when merging from continuous integration branches into `trunk`.
Have set the rules to require that all code reviews to allow to merge.
For huge pull requests, this can take over an hour (to push all of the commits to the branch in order, 1 by 1, waiting for the scans / reviews to finish after push).
- Numerous huge pull requests (which took months to produce, and over an hour just to push the individual commits in order and wait for the results after each push) [were ruined because of this](https://github.com/SwuduSusuwu/SusuLib/pull/61) (once all of the tests pass and you start to push those individual commits to `trunk`, spurious errors result in all commits pushed to `trunk` being removed from the pull request, with no possible commands to insert those back into the pull request if [branch protection of `trunk` blocks force pushes](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#about-branch-protection-rules)).
**URL to the alert on GitHub code scanning (optional)**
Irrelevant, since had to redo
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Aucun fichier source, test ou point d’entrée CodeQL n’est identifié. Commencez par reproduire le rejet intermittent GH013 lors de la fusion décrite de la branche CI et par examiner les résultats de CodeQL et de la protection de branche ; le travail est terminé lorsqu’il est identifié pourquoi une analyse terminée est signalée comme en attente et qu’une correction vérifiable est documentée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- github
- Domaine
- ci-cd, security
- Type d'issue
- Bug
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 20/100