gitea源码

1234567891011121314151617181920212223
  1. // Copyright 2023 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_20
  4. import (
  5. "xorm.io/xorm"
  6. )
  7. func AddNeedApprovalToActionRun(x *xorm.Engine) error {
  8. /*
  9. New index: TriggerUserID
  10. New fields: NeedApproval, ApprovedBy
  11. */
  12. type ActionRun struct {
  13. TriggerUserID int64 `xorm:"index"`
  14. NeedApproval bool // may need approval if it's a fork pull request
  15. ApprovedBy int64 `xorm:"index"` // who approved
  16. }
  17. return x.Sync(new(ActionRun))
  18. }