Skip to content

Commit

Permalink
scanpolicies: Workflow adjustment
Browse files Browse the repository at this point in the history
Remove specification of repository (-R) when creating the PR, and
re-ordered a few things to make the flow more logical.
There's a chance it still needs a fetch for upstream, but I believe the
ambiguity error was caused by having upstream set and specifying a repo.

Signed-off-by: kingthorin <[email protected]>
  • Loading branch information
kingthorin committed Dec 2, 2024
1 parent ce0408a commit 17ad47c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/generate_policies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name $GITHUB_USER
BRANCH=scan-policies-updt
export GITHUB_TOKEN=${{ secrets.ZAPBOT_TOKEN }}
cd zap-extensions
git remote add upstream https://github.com/zaproxy/zap-extensions.git
SRC_BASE="zaproxy/zap-extensions@"$(git log -1 --format=format:%h)
export GITHUB_TOKEN=${{ secrets.ZAPBOT_TOKEN }}
git checkout -b $BRANCH
git remote add upstream https://github.com/zaproxy/zap-extensions.git
# Update the index to be sure git is aware of changes
git update-index -q --refresh
git add .
Expand All @@ -50,5 +50,5 @@ jobs:
git add .
git commit -m "Update scan policies based on Tags" -m "Updates based on $SRC_BASE" --signoff
git push --set-upstream origin $BRANCH --force
gh pr create -R zaproxy/zap-extensions --fill
gh pr create --fill
fi

0 comments on commit 17ad47c

Please sign in to comment.