Skip to content

Commit

Permalink
Merge dependabot/github_actions/codecov/codecov-action-5.1.2 into com…
Browse files Browse the repository at this point in the history
…bined-prs-branch
  • Loading branch information
github-actions[bot] authored Dec 19, 2024
2 parents faa2d2f + f34cc1c commit 1bc6dc2
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sort-direction: ascending

categories:
- title: "⬆️ Dependencies"
labels:
- "dependencies"
- "update-requirements-files"
- "combined-pr"

template: |
## What’s Changed
$CHANGES
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,6 @@ jobs:
python -m coverage report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.0.7
uses: codecov/codecov-action@v5.1.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
114 changes: 114 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- deploy/production

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: read
runs-on: ubuntu-latest
steps:

- name: Get current date
id: get-date
run: |
export CURRENT_DATE=$(TZ=":America/Los_Angeles" date "+%Y-%m-%d")
echo "current_date=${CURRENT_DATE}" >> $GITHUB_OUTPUT
echo "Current date set to ${CURRENT_DATE}"
- name: Get number of releases for the current date
id: get-release-count
run: |
export RELEASE_COUNT=$(gh release list \
--repo ${{ github.repository }} \
--json tagName \
--exclude-drafts \
--jq "map(select(.tagName | startswith(\"${CURRENT_DATE}\")))|length" \
)
echo "release_count=${RELEASE_COUNT}" >> $GITHUB_OUTPUT
echo "Found ${RELEASE_COUNT} releases"
env:
CURRENT_DATE: ${{ steps.get-date.outputs.current_date }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare release version
id: get-version
run: |
export VERSION="${CURRENT_DATE}"
if [ $RELEASE_COUNT -gt 0 ]; then
echo "Release already exists for version ${VERSION}"
echo "Appending release count to version"
export VERSION="${CURRENT_DATE}-${RELEASE_COUNT}"
fi
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "Version set to ${VERSION}"
env:
CURRENT_DATE: ${{ steps.get-date.outputs.current_date }}
RELEASE_COUNT: ${{ steps.get-release-count.outputs.release_count }}


- name: Check that version doesn't exist
id: check-release
run: |
echo "Checking version ${VERSION}"
export CHECK=$(gh release list \
--repo ${{ github.repository }} \
--json tagName \
--exclude-drafts \
--jq "map(select(.tagName == \"${VERSION}\"))|length" \
)
echo "Found ${CHECK} releases"
if [ $CHECK -gt 0 ]; then
echo "Release already exists for version ${VERSION}"
exit 1
fi
env:
VERSION: ${{ steps.get-version.outputs.version }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check that tag doesn't exist
id: check-tag
run: |
echo "Checking tag for version ${VERSION}"
# Query the API for this tag.
export CHECK=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/tags \
--jq "map(select(.name == \"${VERSION}\"))|length" \
)
echo "Found ${CHECK} tags"
if [ $CHECK -gt 0 ]; then
echo "Tag already exists for version ${VERSION}"
exit 1
fi
env:
VERSION: ${{ steps.get-version.outputs.version }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- uses: release-drafter/release-drafter@v6
with:
commitish: deploy/production
tag: ${{ steps.get-version.outputs.version }}
name: ${{ steps.get-version.outputs.version }}
version: ${{ steps.get-version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions primed/primed_anvil/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class AccountAdapter(BaseAccountAdapter):

list_table_class = AccountTable
list_filterset_class = AccountListFilter
account_link_verify_message = """Thank you for linking your account!
The CC will add your account to appropriate groups on AnVIL.
If you do not have access to workspaces that you expect after 24 hours, please contact the CC."""
account_link_verify_redirect = "users:redirect"
account_link_email_subject = "Verify your AnVIL account email"
account_verify_notification_email = "[email protected]"
Expand Down

0 comments on commit 1bc6dc2

Please sign in to comment.