GithubHelp home page GithubHelp logo

Comments (6)

EndBug avatar EndBug commented on May 27, 2024 1

This is intended behavior on GitHub's part: PR status checks always refer to the latest commit, so if you don't re-trigger CI on the automated commit it won't display any status checks

That's because otherwise an action could break your code and the status checks would still be successful

You need to either commit using a PAT, or re-trigger some the status checks you need either manually or via a workflow dispatch call to the API

from add-and-commit.

ernestoguimaraes avatar ernestoguimaraes commented on May 27, 2024

Hey @EndBug ! thank you.

But one question:; I was testing with my friend yesterday. in the same scenario, If I ask him to Update the Branch, the status is not reset. The reset problem happens using GITHUB_TOKEN and now a GitHub App Token. The PAT is an option, however, using in a enterprise scenario, I will reach the PAT Threshold very fast.

from add-and-commit.

EndBug avatar EndBug commented on May 27, 2024

Maybe if you update the branch using the GitHub UI they just keep the previous result, since they "trust" the operation. I don't know exactly what the criteria is though 🙌🏻

I would suggest you allow your "test" workflows, the ones you require the status checks to be run for, to be run via workflow dispatches, then add a step using some action to send the dispatch via the GitHub API
There are a few actions on the marketplace you can use for that, this is one of them: https://github.com/marketplace/actions/workflow-dispatch

from add-and-commit.

ernestoguimaraes avatar ernestoguimaraes commented on May 27, 2024

I was making some tests here and noticed something.
Before my workflow starts, my PR is attached to a commti Hash. As a need to make a Branch commit, It´s creating a new Hash.
Is there a way to make a commit and preserve the original Hash? I believe it´s Fast-Foward, right?

from add-and-commit.

EndBug avatar EndBug commented on May 27, 2024

I don't think it's possible, because the SHA of each commit is generated by git internals by hashing different info about the commit, including the SHA of the parent.
That makes it impossible to insert a commit in the history without modifying every commit down the line.
Even with fast-forward merges or rebases, the SHA of every subsequent commit is re-calcultated.

from add-and-commit.

github-actions avatar github-actions commented on May 27, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from add-and-commit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.