Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sqin2019 committed Jul 19, 2023
1 parent f77c6e1 commit f7b6c96
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/handle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,24 @@ jobs:
with:
files: 'requests/*.{yml,yaml}'
- name: 'Setup Go'
if: ${{ steps.added-yaml-files.outputs.added_files != '' }}
if: '${{ steps.added-yaml-files.outputs.added_files != '''' }}'
uses: 'actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568' # ratchet:actions/setup-go@v3
with:
go-version: '${{ inputs.go_version }}'
- name: 'Authenticate to Google Cloud'
if: ${{ steps.added-yaml-files.outputs.added_files != '' }}
if: '${{ steps.added-yaml-files.outputs.added_files != '''' }}'
uses: 'google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033' # ratchet:google-github-actions/auth@v1
with:
workload_identity_provider: '${{ inputs.workload_identity_provider }}'
service_account: '${{ inputs.service_account }}'
token_format: 'access_token'
- name: 'Install AOD CLI'
if: ${{ steps.added-yaml-files.outputs.added_files != '' }}
if: '${{ steps.added-yaml-files.outputs.added_files != '''' }}'
run: 'go install github.com/sqin2019/access-on-demand-fork/cmd/aod@${{ inputs.aod_cli_version }}'
# Request will not be handled when iam.yaml file does not exist in the
# case of a pull_request_review event, instead it prints out a notice.
- name: 'Handle IAM Request'
if: ${{ steps.added-yaml-files.outputs.added_files != '' }}
if: '${{ steps.added-yaml-files.outputs.added_files != '''' }}'
env:
# DURATION: '${{ env.DEFAULT_DURATION }}'
# Assume there is only one file
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iam_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
if: '${{ steps.cpr.outputs.pull-request-number }}'
uses: 'hmarr/auto-approve-action@v3'
with:
review-message: "Auto approved automated PR"
review-message: 'Auto approved automated PR'
pull-request-number: '${{ steps.cpr.outputs.pull-request-number }}'
- name: 'Enable Pull Request Automerge'
if: '${{ steps.cpr.outputs.pull-request-number }}'
Expand Down
6 changes: 2 additions & 4 deletions pkg/cli/iam_cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
"fmt"
"time"

"github.com/abcxyz/pkg/cli"
"github.com/posener/complete/v2/predict"
"github.com/sqin2019/access-on-demand-fork/apis/v1alpha1"
"github.com/sqin2019/access-on-demand-fork/pkg/handler"
"github.com/sqin2019/access-on-demand-fork/pkg/requestutil"
"github.com/abcxyz/pkg/cli"
"github.com/posener/complete/v2/predict"

resourcemanager "cloud.google.com/go/resourcemanager/apiv3"
)
Expand Down Expand Up @@ -152,8 +152,6 @@ func (c *IAMCleanupCommand) handleIAM(ctx context.Context) error {
// Wrap IAMRequest to include Duration.
reqWrapper := &v1alpha1.IAMRequestWrapper{
IAMRequest: &req,
Duration: c.flagDuration,
StartTime: c.flagStartTime,
}
// TODO(#15): add a log level to output handler response.
if _, err := h.Cleanup(ctx, reqWrapper); err != nil {
Expand Down

0 comments on commit f7b6c96

Please sign in to comment.