Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README again #1630

Merged
merged 1 commit into from
Mar 25, 2024
Merged

Update README again #1630

merged 1 commit into from
Mar 25, 2024

Conversation

stefannibrasil
Copy link

There's a rule for when a branch is merged for factory_bot. I tried removing [ci-skip] from the original workflow to trigger all CI actions. It didn't work, still got the same error:

remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: Required status check "Run standard" is expected.
To https://github.com/thoughtbot/factory_bot.git
 ! [remote rejected] main -> main (protected branch hook declined)

Gonna try going through the PR workflow to see if the rule gets happy.

There's a rule for when a branch is merged for factory_bot.
I tried removing `[ci-skip]` from the original workflow
to trigger all CI actions. It didn't work, still got the same error:

```
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: Required status check "Run standard" is expected.
To https://github.com/thoughtbot/factory_bot.git
 ! [remote rejected] main -> main (protected branch hook declined)
```

Gonna try going through the PR workflow to see if the rule
gets happy.
@stefannibrasil
Copy link
Author

Trying it now.

@stefannibrasil stefannibrasil merged commit 0e07cb9 into main Mar 25, 2024
21 checks passed
@stefannibrasil stefannibrasil deleted the sb-dynamic-readme-update branch March 25, 2024 18:07
@stefannibrasil
Copy link
Author

@mike-burns sorry to bother you but running into some issues with the dynamic README workflow. I opened a PR and standard was green. Not sure why I still get this error:

remote: error: GH006: Protected branch update failed for refs/heads/main.        
remote: error: Required status check "Run standard" is expected.        
To https://github.com/thoughtbot/factory_bot.git
 ! [remote rejected] main -> main (protected branch hook declined)
error: failed to push some refs to '***github.com/thoughtbot/factory_bot.git'

That's because we have this branch rule:

Choose which [status checks](https://docs.github.com/rest/commits/statuses) must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed.

Standard was passing when I opened this PR. Do you know what else it needs to be changed for the dynamic readme action to run successfully? 🤔 I also don't want to pollute the git history. Will do some research and try on another test repo but let me know if you have any ideas. Thanks!

@stefannibrasil
Copy link
Author

Ahhhhh, got the answer: so the problem is that the dynamic README pushes to main and this repo has a rule against that. I'm curious to know if you're open to considering removing that rule? Any strong cases for keeping it? @mike-burns If you prefer keeping that, I can revert the dynamic README until we figure out how to handle this scenario.

@mike-burns
Copy link
Contributor

The only rule this repo has for pushes against main is that CI must pass. It looks like Standard is failing (or maybe I'm reading the error wrong and CI simply isn't running). Is there a way to do this whole process while making sure CI passes?

@stefannibrasil
Copy link
Author

Is there a way to do this whole process while making sure CI passes?

I'm gonna explore this option and let you know 👍

@stefannibrasil
Copy link
Author

Okay, put up a PR to handle this case: thoughtbot/templates#31 Once that's merged, I will update this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants