Add capability-development branch protection CI#327
Conversation
|
|
The latest Buf updates on your PR. Results from workflow Regenerate Protobuf Files / buf (pull_request).
|
359eb9d to
4396356
Compare
377d01d to
64301fe
Compare
| run: | | ||
| git fetch origin "${TARGET_BRANCH}" --quiet 2>/dev/null || true | ||
|
|
||
| CRE_CHANGED=$(git diff --name-only "origin/${TARGET_BRANCH}" -- cre/) |
There was a problem hiding this comment.
| CRE_CHANGED=$(git diff --name-only "origin/${TARGET_BRANCH}" -- cre/) | |
| CRE_CHANGED=$(git diff --name-only "origin/${TARGET_BRANCH}...HEAD" -- cre/) |
A little more precise
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| check-cre-target-branch: | ||
| runs-on: ubuntu-latest | ||
| steps: |
There was a problem hiding this comment.
| permissions: | |
| contents: read | |
| jobs: | |
| check-cre-target-branch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| permissions: {} | |
| jobs: | |
| check-cre-target-branch: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: |
It's better to scope perms to just the job and "blank out" default perms.
|
|
||
| CRE_CHANGED=$(git diff --name-only "origin/${TARGET_BRANCH}" -- cre/) | ||
|
|
||
| if [ -z "$CRE_CHANGED" ]; then |
There was a problem hiding this comment.
| if [ -z "$CRE_CHANGED" ]; then | |
| if [[ -z "$CRE_CHANGED" ]]; then |
Nit, but with bash it's always safer to use [[ for test/conditionals.
| if [ "$TARGET_BRANCH" != "main" ]; then | ||
| echo "PR targets '${TARGET_BRANCH}', not 'main'. CRE changes are allowed." | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
Should you just filter on on.pull_request.branches: [main]?
721414a to
a72b2e4
Compare
chainchad
left a comment
There was a problem hiding this comment.
LGTM! I would change all [ to [[ for the remaining bash conditionals but can be done in a follow-up or future.
* Add Pharos Atlantic support (#306) * Added Pharos Atlantic support * Auto-fix: buf format, gofmt, go generate, go mod tidy --------- Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> * aptos proto: add ledger_version to ViewRequest (#310) * aptos proto: add ledger_version to ViewRequest * Auto-fix: buf format, gofmt, go generate, go mod tidy --------- Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> * Add xlayer, megaeth, cronos, mantle, tac, unichain, scroll, sonic testnet support (#308) * Added xlayer megaeth cronos mantle tac unichain scroll sonic support * Auto-fix: buf format, gofmt, go generate, go mod tidy * Added celo sepolia * Auto-fix: buf format, gofmt, go generate, go mod tidy * Added gnosis chiado * Auto-fix: buf format, gofmt, go generate, go mod tidy * Removed celo sepolia * Auto-fix: buf format, gofmt, go generate, go mod tidy * Removed gnosis chiado * Auto-fix: buf format, gofmt, go generate, go mod tidy --------- Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> * Add andesite chain (#313) * Added andesite chain * Auto-fix: buf format, gofmt, go generate, go mod tidy --------- Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> * Add new mainnet chains to client proto (#315) * Added new mainnet chains to client proto * Auto-fix: buf format, gofmt, go generate, go mod tidy --------- Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> * Remove aptos (moved to capabilities-development branch) (#316) * remove aptos * Auto-fix: buf format, gofmt, go generate, go mod tidy --------- Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> * Add owner and execution_id to WorkflowExecution proto (#317) Adds workflow-level context to the app-specific proto rather than the generic ComputeRequest type, per vreff's feedback on CC PR #277. The enclave app reads these from the deserialized WorkflowExecution for runtime secret fetching from VaultDON via the relay DON. * Add Privacy as codeowners of protos embedded gen files (#318) * feat: add NodeBuildInfo proto and register it in chip schemas (#320) * Revert "Remove aptos (moved to capabilities-development branch) (#316)" (#321) This reverts commit 1124ff8. * Add hyperliquid mainnet to client proto (#322) * Added hyperliquid mainnet to client proto * Auto-fix: buf format, gofmt, go generate, go mod tidy --------- Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> * Add gnosis chiado to client proto (#324) * Added gnosis chiado to client proto * Auto-fix: buf format, gofmt, go generate, go mod tidy --------- Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> * add WorkflowUserMetric (#319) * add WorkflowUserMetric * fix metric suffix * bot: regenerate protobuf files * add USER_METRIC_TYPE_UNSPECIFIED * bot: regenerate protobuf files * update WorkflowUserMetric value to double * drop histogram support * bot: regenerate protobuf files --------- Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> * Revert "Revert "Remove aptos (moved to capabilities-development branch) (#316…" (#331) This reverts commit ad04ed6. * Add capability-development branch protection CI (#327) * Add capability-development branch protection ci * Upgraded checkout action to major version tag * Updated validation to only occur when target branch is main * Addressed feedback * beholder: publish workflows/v2/workflow_user_metric (#333) * beholder: publish workflows/v2/workflow_user_metric.proto * remove entry from deprecated files * cre-1835: steady and transition indicators (#334) --------- Co-authored-by: amit-momin <108959691+amit-momin@users.noreply.github.com> Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> Co-authored-by: cawthorne <cawthornegd@gmail.com> Co-authored-by: Tejaswi Nadahalli <tejaswi.nadahalli@smartcontract.com> Co-authored-by: vreff <104409744+vreff@users.noreply.github.com> Co-authored-by: Gheorghe Strimtu <studentcuza@gmail.com> Co-authored-by: karen-stepanyan <91897037+karen-stepanyan@users.noreply.github.com> Co-authored-by: mchain0 <maciej.wisniewski@smartcontract.com>
No description provided.