Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
update change log script
Maidul Islamcd0df2d617c3
diff --git a/.github/resources/changelog-generator.py b/.github/resources/changelog-generator.pyindex 1e8c678715..7dd8140eee 100644--- a/.github/resources/changelog-generator.py+++ b/.github/resources/changelog-generator.py@@ -12,7 +12,7 @@ import uuidREPO_OWNER = "infisical"REPO_NAME = "infisical"TOKEN = os.environ["GITHUB_TOKEN"]-# SLACK_WEBHOOK_URL = os.environ["SLACK_WEBHOOK_URL"]+SLACK_WEBHOOK_URL = os.environ["SLACK_WEBHOOK_URL"]OPENAI_API_KEY = os.environ["OPENAI_API_KEY"]SLACK_MSG_COLOR = "#36a64f"@@ -30,6 +30,23 @@ def set_multiline_output(name, value):print(value, file=fh)print(delimiter, file=fh)+def post_changelog_to_slack(changelog, tag):+ slack_payload = {+ "text": "Hey team, it's changelog time! :wave:",+ "attachments": [+ {+ "color": SLACK_MSG_COLOR,+ "title": f"🗓️Infisical Changelog - {tag}",+ "text": changelog,+ }+ ],+ }++ response = requests.post(SLACK_WEBHOOK_URL, json=slack_payload)++ if response.status_code != 200:+ raise Exception("Failed to post changelog to Slack.")+def find_previous_release_tag(release_tag:str):previous_tag = subprocess.check_output(["git", "describe", "--tags", "--abbrev=0", f"{release_tag}^"]).decode("utf-8").strip()while not(previous_tag.startswith("infisical/")):@@ -123,20 +140,17 @@ The changelog should:6. Linear Links: note that the Linear link is optional, include it only if provided.7. Do not wrap your answer in a codeblock. Just output the text, nothing elseHere's a good example to follow, please try to match the formatting as closely as possible, only changing the content of the changelog and have some liberty with the introduction. Notice the importance of the formatting of a changelog item:-```-- <https://github.com/facebook/react/pull/27304/|#27304>: We optimize our ci to strip comments and minify production builds. (<https://linear.app/example/issue/WEB-1234/|WEB-1234>))-```+- <https://github.com/facebook/react/pull/27304/%7C#27304>: We optimize our ci to strip comments and minify production builds. (<https://linear.app/example/issue/WEB-1234/%7CWEB-1234>))And here's an example of the full changelog:-```+*Features*-• <https://github.com/facebook/react/pull/27304/|#27304>: We optimize our ci to strip comments and minify production builds. (<https://linear.app/example/issue/WEB-1234/|WEB-1234>)+• <https://github.com/facebook/react/pull/27304/%7C#27304>: We optimize our ci to strip comments and minify production builds. (<https://linear.app/example/issue/WEB-1234/%7CWEB-1234>)*Fixes & Improvements*-• <https://github.com/facebook/react/pull/27304/|#27304>: We optimize our ci to strip comments and minify production builds. (<https://linear.app/example/issue/WEB-1234/|WEB-1234>)+• <https://github.com/facebook/react/pull/27304/%7C#27304>: We optimize our ci to strip comments and minify production builds. (<https://linear.app/example/issue/WEB-1234/%7CWEB-1234>)*Technical Updates*-• <https://github.com/facebook/react/pull/27304/|#27304>: We optimize our ci to strip comments and minify production builds. (<https://linear.app/example/issue/WEB-1234/|WEB-1234>)+• <https://github.com/facebook/react/pull/27304/%7C#27304>: We optimize our ci to strip comments and minify production builds. (<https://linear.app/example/issue/WEB-1234/%7CWEB-1234>)Stay tuned for more exciting updates coming soon!-```And here are the commits:{}""".format(@@ -166,11 +180,11 @@ if __name__ == "__main__":pr_details = extract_commit_details_from_prs(prs)# Generate changelog- changelog = f"## Infisical - {latest_tag}\n\n{generate_changelog_with_openai(pr_details)}"+ changelog = generate_changelog_with_openai(pr_details)+ post_changelog_to_slack(changelog,latest_tag)# Print or post changelog to Slack- set_multiline_output("changelog", changelog)+ # set_multiline_output("changelog", changelog)except Exception as e:- print(str(e))-+ print(str(e))\ No newline at end of filediff --git a/.github/workflows/generate-release-changelog.yml b/.github/workflows/generate-release-changelog.ymlindex 48e35497d6..de14f288ad 100644--- a/.github/workflows/generate-release-changelog.yml+++ b/.github/workflows/generate-release-changelog.yml@@ -2,7 +2,10 @@ name: Generate Changelogpermissions:contents: write-on: [workflow_dispatch]+on:+ push:+ tags:+ - "infisical/v*.*.*-postgres"jobs:generate_changelog:@@ -10,6 +13,8 @@ jobs:steps:- name: Checkout codeuses: actions/checkout@v3+ with:+ fetch-tags: true- name: Set up Pythonuses: actions/setup-python@v5with:@@ -24,13 +29,4 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}- - name: Set git identity- run: |- git config user.name 'github-actions[bot]'- git config user.email 'github-actions[bot]@infisical.noreply.github.com'- - name: Save the changelog to file- run: |- echo "${{ steps.gen-changelog.outputs.changelog }}" >> CHANGELOG.md- git add CHANGELOG.md- git commit -m "chore: changelog update" --no-verify- git push origin main+ SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}\ No newline at end of file