Though you may do your banking with a credit union, most credit unions are operated differently than banks, and as such, have different rules regarding members who declare bankruptcy while owing a debt to the union.
In order to be a member of a credit union, there are certain requirements that you must maintain to be in good standing, one of which is not causing the credit union a financial loss. If you declare bankruptcy and list a loan or credit card from your credit union, that would be considered a financial loss that you have caused them, and your membership will most likely be revoked.
If your membership is going to be revoked, your credit union will send you a letter informing you that your membership has been terminated due to the financial loss. However, if you are serious about maintaining your membership with your credit union, you do have options. You can agree to pay back your debt by signing a reaffirmation. However, this is not considered a good option in most circumstances. One primary reason is that bankruptcy requires all debts to be treated equally, so the debt to the credit union must be repaid outside of the 90-day lookback window and preferably much sooner than that.