Skip to content

Commit

Permalink
[JFDI] Restore write permission & handle edits to PR names (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwtyler authored Aug 30, 2023
1 parent 25338f6 commit 19d013a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ on:
push:
branches:
- main

permissions:
contents: write

jobs:
tag-release:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/update-self.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Package Updater
on:
schedule:
- cron: '0 * * * *'

permissions:
contents: write
pull-requests: write

jobs:
update:
runs-on: ubuntu-latest
Expand Down
5 changes: 3 additions & 2 deletions bin/dependency-check-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ main() {
local NUMBER_TO_CLOSE_LATER=""
for PR in $(jq -c '.[]' <<<"${LIST_OF_PRS}"); do
echo "${PR}"
if [[ "$(jq -cr .title<<<"${PR}")" == "${PR_TITLE}" ]]; then
if [[ "$(jq -cr .title<<<"${PR}")" == *"${PR_TITLE}" ]]; then
# This captures open PRs, or PRs closed without merging
# Prepended wildcards allows PR to be manually edited with a JIRA ticket
echo "PR Already Created"
continue 2
fi

if [[ "$(jq -cr .title<<<"${PR}")" == "${PR_TITLE_BASE}"* && "$(jq -cr .closed<<<"${PR}")" == "false" ]]; then
if [[ "$(jq -cr .title<<<"${PR}")" == *"${PR_TITLE_BASE}"* && "$(jq -cr .closed<<<"${PR}")" == "false" ]]; then
echo "PR for a Previous version exists"
NUMBER_TO_CLOSE_LATER="$(jq -cr .number<<<"${PR}")"
echo "${NUMBER_TO_CLOSE_LATER}"
Expand Down

0 comments on commit 19d013a

Please sign in to comment.