From f25f7eb58105ff9357527426e38b9d5165b68494 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sat, 17 Aug 2024 15:02:26 +0200 Subject: [PATCH 01/11] chore(actions): Update dependabot.yml Signed-off-by: Lala Sabathil --- .github/dependabot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d26063e675..a36074330e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,7 +10,7 @@ updates: major-version-bumps: update-types: ["major"] schedule: - interval: "weekly" + interval: "daily" commit-message: prefix: "chore" prefix-development: "chore" @@ -25,7 +25,7 @@ updates: major-version-bumps: update-types: ["major"] schedule: - interval: "weekly" + interval: "daily" commit-message: prefix: "ci" include: "scope" From a264e2290a7e7fef58d354b0af7b8e9d32c22294 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 17 Aug 2024 15:18:08 +0200 Subject: [PATCH 02/11] ci(deps): bump pycord-development/execute-whitelist-action from 1.0.5 to 1.0.6 in the patch-version-bumps group (#2552) ci(deps): bump pycord-development/execute-whitelist-action Bumps the patch-version-bumps group with 1 update: [pycord-development/execute-whitelist-action](https://github.com/pycord-development/execute-whitelist-action). Updates `pycord-development/execute-whitelist-action` from 1.0.5 to 1.0.6 - [Release notes](https://github.com/pycord-development/execute-whitelist-action/releases) - [Commits](https://github.com/pycord-development/execute-whitelist-action/compare/v1.0.5...v1.0.6) --- updated-dependencies: - dependency-name: pycord-development/execute-whitelist-action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patch-version-bumps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68cd1d51ab..7ab046a2fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: environment: release steps: - name: "Security Check" - uses: pycord-development/execute-whitelist-action@v1.0.5 + uses: pycord-development/execute-whitelist-action@v1.0.6 with: whitelisted-github-ids: ${{ vars.ALLOWED_USER_IDS }} token: ${{ secrets.GITHUB_TOKEN }} From eb3bc5dcd3dee51d2531c890392790f1a49ae1c6 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sat, 17 Aug 2024 15:41:56 +0200 Subject: [PATCH 03/11] [ci skip] fix(deps-actions): update whitelist action Signed-off-by: Lala Sabathil --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ab046a2fc..34eefe5212 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: environment: release steps: - name: "Security Check" - uses: pycord-development/execute-whitelist-action@v1.0.6 + uses: pycord-development/execute-whitelist-action@v1.0.10 with: whitelisted-github-ids: ${{ vars.ALLOWED_USER_IDS }} token: ${{ secrets.GITHUB_TOKEN }} From 1c62306b5506c6626527114d86e16ded521d664d Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 18 Aug 2024 14:45:52 +0200 Subject: [PATCH 04/11] feat(actions): seperate rdt localization build trigger through gha --- .github/workflows/readthedocs.yml | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/readthedocs.yml diff --git a/.github/workflows/readthedocs.yml b/.github/workflows/readthedocs.yml new file mode 100644 index 0000000000..e5b039625c --- /dev/null +++ b/.github/workflows/readthedocs.yml @@ -0,0 +1,39 @@ +name: "Read The Docs Localization" + +on: + push: + branches: [master] + paths: + - "discord/**" + - "docs/**" + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + +permissions: write-all + +jobs: + localization_builds: + runs-on: ubuntu-latest + environment: documentation + strategy: + matrix: + rdt_projects: [ + "pycord-spanish", + "pycord-japanese", + "pycord-brazilian", + "pycord-russian", + "pycord-german", + "pycord-hindi", + "pycord-korean", + "pycord-italian", + "pycord-chinese", + "pycord-french" + ] + steps: + - name: "Trigger RDT ${{ matrix.rdt_projects }}" + run: | + PROJECT=${{ matrix.rdt_projects }} + curl --location --request POST "https://readthedocs.org/api/v3/projects/$PROJECT/versions/master/builds/" \ + --header 'Content-Type: application/json' \ + --header "Authorization: Token ${{ secrets.READTHEDOCS_TOKEN }}" \ No newline at end of file From b80fedc49bbfbaa50736a43e1cafc1cacd936361 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 18 Aug 2024 15:05:10 +0200 Subject: [PATCH 05/11] fix(docs): fix linkcheck issues --- .github/workflows/docs-checks.yml | 7 ++++++- .gitignore | 1 + CHANGELOG.md | 5 ++--- discord/guild.py | 2 +- docs/build/locales/api/models.pot | 2 +- docs/conf.py | 8 ++++++++ docs/locales/de/LC_MESSAGES/api/models.po | 5 ++--- docs/locales/es/LC_MESSAGES/api/models.po | 5 ++--- docs/locales/fr/LC_MESSAGES/api/models.po | 5 ++--- docs/locales/hi/LC_MESSAGES/api/models.po | 5 ++--- docs/locales/it/LC_MESSAGES/api/models.po | 5 ++--- docs/locales/ja/LC_MESSAGES/api/models.po | 5 ++--- docs/locales/ja/LC_MESSAGES/build/locales/api/models.po | 5 ++--- docs/locales/ko/LC_MESSAGES/api/models.po | 5 ++--- docs/locales/pt_BR/LC_MESSAGES/api/models.po | 5 ++--- docs/locales/ru/LC_MESSAGES/api/models.po | 5 ++--- docs/locales/zh_CN/LC_MESSAGES/api/models.po | 5 ++--- 17 files changed, 41 insertions(+), 39 deletions(-) diff --git a/.github/workflows/docs-checks.yml b/.github/workflows/docs-checks.yml index 6f8d9ad61a..0837c60f84 100644 --- a/.github/workflows/docs-checks.yml +++ b/.github/workflows/docs-checks.yml @@ -17,6 +17,11 @@ on: - "*.toml" - "*.py" workflow_dispatch: + inputs: + with_linkcheck: + type: boolean + description: "Whether to run the linkcheck" + default: true schedule: - cron: "0 0 * * *" @@ -44,7 +49,7 @@ jobs: python -m pip install -U pip pip install ".[docs]" - name: "Check Links" - if: ${{ github.event_name == 'schedule' }} + if: ${{ github.event_name == 'schedule' || inputs.with_linkcheck }} run: | cd docs make linkcheck diff --git a/.gitignore b/.gitignore index d6f1a4d460..96be4f61db 100644 --- a/.gitignore +++ b/.gitignore @@ -186,6 +186,7 @@ docs/changelog.md # Translations docs/build/html docs/build/doctrees +docs/build/linkcheck !docs/build/locales/* *.mo !docs/locales/* diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e71e51acc..ceaa298b18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -322,7 +322,6 @@ These changes are available on the `master` branch, but have not yet been releas ([#2185](https://github.com/Pycord-Development/pycord/pull/2185)) - Fixed inaccurate `Union` type hint of `values` argument of `basic_autocomplete` to include `Iterable[OptionChoice]`. - ([#2164](https://github.com/Pycord-Development/pycord/pull/2164)) - Fixed initial message inside of the create thread payload sending legacy beta payload. ([#2191](https://github.com/Pycord-Development/pycord/pull/2191)) - Fixed a misplaced payload object inside of the thread creation payload. @@ -652,7 +651,7 @@ These changes are available on the `master` branch, but have not yet been releas - Fix `VoiceChannel`/`CategoryChannel` data being invalidated on `Option._invoke`. ([#1490](https://github.com/Pycord-Development/pycord/pull/1490)) -- Fix type issues in options.py +- Fix type issues in `options.py` ([#1473](https://github.com/Pycord-Development/pycord/pull/1473)) - Fix KeyError on AutoModActionExecution when the bot lacks the Message Content Intent. ([#1521](https://github.com/Pycord-Development/pycord/pull/1521)) @@ -903,7 +902,7 @@ These changes are available on the `master` branch, but have not yet been releas ([#1240](https://github.com/Pycord-Development/pycord/pull/1240)) [unreleased]: https://github.com/Pycord-Development/pycord/compare/v2.6.0...HEAD -[2.6.0]: https://github.com/Pycord-Development/pycord/compare/v2.5.0...2.6.0 +[2.6.0]: https://github.com/Pycord-Development/pycord/compare/v2.5.0...v2.6.0 [2.5.0]: https://github.com/Pycord-Development/pycord/compare/v2.4.1...v2.5.0 [2.4.1]: https://github.com/Pycord-Development/pycord/compare/v2.4.0...v2.4.1 [2.4.0]: https://github.com/Pycord-Development/pycord/compare/v2.3.3...v2.4.0 diff --git a/discord/guild.py b/discord/guild.py index 52d2acd783..75fcc7c5c7 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -210,7 +210,7 @@ class Guild(Hashable): features: List[:class:`str`] A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features - `here `_. + `here `_. premium_tier: :class:`int` The premium tier for this guild. Corresponds to "Nitro Server" in the official UI. The number goes from 0 to 3 inclusive. diff --git a/docs/build/locales/api/models.pot b/docs/build/locales/api/models.pot index 5bf47a50f1..19dd1420c0 100644 --- a/docs/build/locales/api/models.pot +++ b/docs/build/locales/api/models.pot @@ -7434,7 +7434,7 @@ msgstr "" #: ../../../discord/guild.py:docstring of discord.guild.Guild:141 #: 96094a79a794453ca947a68e85a7ac9d -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgstr "" #: ../../../discord/automod.py:docstring of discord.automod.AutoModTriggerMetadata:29 diff --git a/docs/conf.py b/docs/conf.py index 2a7fdb532e..09f5f89c6b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -480,6 +480,14 @@ def write_new(): r"https://discord.com/developers/docs/.*#", r"https://support(?:-dev)?.discord.com/hc/en-us/articles/.*", r"https://dis.gd/contact", + r"https://guide.pycord.dev/", + r"https://guide.pycord.dev/.*", + r"https://pycord.dev/", + r"https://pycord.dev/.*" +] + +linkcheck_anchors_ignore_for_url = [ + r"https://github.com/Delitefully/DiscordLists" ] modindex_common_prefix = ["discord."] diff --git a/docs/locales/de/LC_MESSAGES/api/models.po b/docs/locales/de/LC_MESSAGES/api/models.po index 8d62e39e44..d237b05c48 100644 --- a/docs/locales/de/LC_MESSAGES/api/models.po +++ b/docs/locales/de/LC_MESSAGES/api/models.po @@ -1727,8 +1727,8 @@ msgstr "The guild's notification settings." msgid ":class:`NotificationLevel`" msgstr ":class:`NotificationLevel`" -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." -msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgid "List[:class:`str`]" msgstr "List[:class:`str`]" @@ -7801,4 +7801,3 @@ msgstr "These are typically given for channel follower webhooks." msgid "Represents a partial channel for webhooks." msgstr "Represents a partial channel for webhooks." - diff --git a/docs/locales/es/LC_MESSAGES/api/models.po b/docs/locales/es/LC_MESSAGES/api/models.po index 209146bb6a..1f5feb0920 100644 --- a/docs/locales/es/LC_MESSAGES/api/models.po +++ b/docs/locales/es/LC_MESSAGES/api/models.po @@ -1727,8 +1727,8 @@ msgstr "The guild's notification settings." msgid ":class:`NotificationLevel`" msgstr ":class:`NotificationLevel`" -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." -msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgid "List[:class:`str`]" msgstr "List[:class:`str`]" @@ -7801,4 +7801,3 @@ msgstr "These are typically given for channel follower webhooks." msgid "Represents a partial channel for webhooks." msgstr "Represents a partial channel for webhooks." - diff --git a/docs/locales/fr/LC_MESSAGES/api/models.po b/docs/locales/fr/LC_MESSAGES/api/models.po index f035829bac..9bdb162ca1 100644 --- a/docs/locales/fr/LC_MESSAGES/api/models.po +++ b/docs/locales/fr/LC_MESSAGES/api/models.po @@ -1727,8 +1727,8 @@ msgstr "The guild's notification settings." msgid ":class:`NotificationLevel`" msgstr ":class:`NotificationLevel`" -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." -msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgid "List[:class:`str`]" msgstr "List[:class:`str`]" @@ -7801,4 +7801,3 @@ msgstr "These are typically given for channel follower webhooks." msgid "Represents a partial channel for webhooks." msgstr "Represents a partial channel for webhooks." - diff --git a/docs/locales/hi/LC_MESSAGES/api/models.po b/docs/locales/hi/LC_MESSAGES/api/models.po index 340260998e..d9ee5da48f 100644 --- a/docs/locales/hi/LC_MESSAGES/api/models.po +++ b/docs/locales/hi/LC_MESSAGES/api/models.po @@ -1727,8 +1727,8 @@ msgstr "The guild's notification settings." msgid ":class:`NotificationLevel`" msgstr ":class:`NotificationLevel`" -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." -msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgid "List[:class:`str`]" msgstr "List[:class:`str`]" @@ -7801,4 +7801,3 @@ msgstr "These are typically given for channel follower webhooks." msgid "Represents a partial channel for webhooks." msgstr "Represents a partial channel for webhooks." - diff --git a/docs/locales/it/LC_MESSAGES/api/models.po b/docs/locales/it/LC_MESSAGES/api/models.po index 340260998e..d9ee5da48f 100644 --- a/docs/locales/it/LC_MESSAGES/api/models.po +++ b/docs/locales/it/LC_MESSAGES/api/models.po @@ -1727,8 +1727,8 @@ msgstr "The guild's notification settings." msgid ":class:`NotificationLevel`" msgstr ":class:`NotificationLevel`" -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." -msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgid "List[:class:`str`]" msgstr "List[:class:`str`]" @@ -7801,4 +7801,3 @@ msgstr "These are typically given for channel follower webhooks." msgid "Represents a partial channel for webhooks." msgstr "Represents a partial channel for webhooks." - diff --git a/docs/locales/ja/LC_MESSAGES/api/models.po b/docs/locales/ja/LC_MESSAGES/api/models.po index 11445c8af0..1289ac1293 100644 --- a/docs/locales/ja/LC_MESSAGES/api/models.po +++ b/docs/locales/ja/LC_MESSAGES/api/models.po @@ -1727,8 +1727,8 @@ msgstr "The guild's notification settings." msgid ":class:`NotificationLevel`" msgstr ":class:`NotificationLevel`" -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." -msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgid "List[:class:`str`]" msgstr "List[:class:`str`]" @@ -7801,4 +7801,3 @@ msgstr "These are typically given for channel follower webhooks." msgid "Represents a partial channel for webhooks." msgstr "Represents a partial channel for webhooks." - diff --git a/docs/locales/ja/LC_MESSAGES/build/locales/api/models.po b/docs/locales/ja/LC_MESSAGES/build/locales/api/models.po index 6c343a365b..e32c62e44a 100644 --- a/docs/locales/ja/LC_MESSAGES/build/locales/api/models.po +++ b/docs/locales/ja/LC_MESSAGES/build/locales/api/models.po @@ -1727,8 +1727,8 @@ msgstr "The guild's notification settings." msgid ":class:`NotificationLevel`" msgstr ":class:`NotificationLevel`" -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." -msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgid "List[:class:`str`]" msgstr "List[:class:`str`]" @@ -7786,4 +7786,3 @@ msgstr "These are typically given for channel follower webhooks." msgid "Represents a partial channel for webhooks." msgstr "Represents a partial channel for webhooks." - diff --git a/docs/locales/ko/LC_MESSAGES/api/models.po b/docs/locales/ko/LC_MESSAGES/api/models.po index ae7418f17f..e7323257ce 100644 --- a/docs/locales/ko/LC_MESSAGES/api/models.po +++ b/docs/locales/ko/LC_MESSAGES/api/models.po @@ -1727,8 +1727,8 @@ msgstr "The guild's notification settings." msgid ":class:`NotificationLevel`" msgstr ":class:`NotificationLevel`" -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." -msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgid "List[:class:`str`]" msgstr "List[:class:`str`]" @@ -7801,4 +7801,3 @@ msgstr "These are typically given for channel follower webhooks." msgid "Represents a partial channel for webhooks." msgstr "Represents a partial channel for webhooks." - diff --git a/docs/locales/pt_BR/LC_MESSAGES/api/models.po b/docs/locales/pt_BR/LC_MESSAGES/api/models.po index cd3f8bc4f6..263439db62 100644 --- a/docs/locales/pt_BR/LC_MESSAGES/api/models.po +++ b/docs/locales/pt_BR/LC_MESSAGES/api/models.po @@ -1727,8 +1727,8 @@ msgstr "The guild's notification settings." msgid ":class:`NotificationLevel`" msgstr ":class:`NotificationLevel`" -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." -msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgid "List[:class:`str`]" msgstr "List[:class:`str`]" @@ -7801,4 +7801,3 @@ msgstr "These are typically given for channel follower webhooks." msgid "Represents a partial channel for webhooks." msgstr "Represents a partial channel for webhooks." - diff --git a/docs/locales/ru/LC_MESSAGES/api/models.po b/docs/locales/ru/LC_MESSAGES/api/models.po index 19d6412c71..e42bf5ff01 100644 --- a/docs/locales/ru/LC_MESSAGES/api/models.po +++ b/docs/locales/ru/LC_MESSAGES/api/models.po @@ -1727,8 +1727,8 @@ msgstr "The guild's notification settings." msgid ":class:`NotificationLevel`" msgstr ":class:`NotificationLevel`" -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." -msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgid "List[:class:`str`]" msgstr "List[:class:`str`]" @@ -7801,4 +7801,3 @@ msgstr "These are typically given for channel follower webhooks." msgid "Represents a partial channel for webhooks." msgstr "Represents a partial channel for webhooks." - diff --git a/docs/locales/zh_CN/LC_MESSAGES/api/models.po b/docs/locales/zh_CN/LC_MESSAGES/api/models.po index 41e92d1760..942e0f10ac 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/api/models.po +++ b/docs/locales/zh_CN/LC_MESSAGES/api/models.po @@ -1727,8 +1727,8 @@ msgstr "The guild's notification settings." msgid ":class:`NotificationLevel`" msgstr ":class:`NotificationLevel`" -msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." -msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgid "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." +msgstr "A list of features that the guild has. The features that a guild can have are subject to arbitrary change by Discord. You can find a catalog of guild features `here `_." msgid "List[:class:`str`]" msgstr "List[:class:`str`]" @@ -7801,4 +7801,3 @@ msgstr "These are typically given for channel follower webhooks." msgid "Represents a partial channel for webhooks." msgstr "Represents a partial channel for webhooks." - From 3a1c8270162a7dcabe2d9a60d5b1f9fdcf6f414b Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 18 Aug 2024 15:14:42 +0200 Subject: [PATCH 06/11] [ci skip] fix: fix linkcheck again --- docs/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 09f5f89c6b..1d14607daa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -483,7 +483,8 @@ def write_new(): r"https://guide.pycord.dev/", r"https://guide.pycord.dev/.*", r"https://pycord.dev/", - r"https://pycord.dev/.*" + r"https://pycord.dev/.*", + r"https://packages.debian.org/.*" ] linkcheck_anchors_ignore_for_url = [ From 2b731a9fadeeec1707a36dec9b2aac094a17fa49 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 18 Aug 2024 22:31:30 +0200 Subject: [PATCH 07/11] fix(releases): fix release builds & add new release system --- .github/workflows/release.yml | 191 +++++++++------------------------- README.rst | 1 + pyproject.toml | 6 +- requirements/_locale.txt | 4 +- requirements/_release.txt | 5 + requirements/dev.txt | 2 +- 6 files changed, 63 insertions(+), 146 deletions(-) create mode 100644 requirements/_release.txt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 34eefe5212..6b3922b2f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,19 +25,23 @@ jobs: needs: [safety_check] outputs: branch_name: ${{ steps.determine_vars.outputs.branch_name }} - is_rc: ${{ steps.determine_vars.outputs.version }} - version: ${{ steps.determine_vars.outputs.is_rc }} + is_rc: ${{ steps.determine_vars.outputs.is_rc }} + version: ${{ steps.determine_vars.outputs.version }} previous_tag: ${{ steps.determine_vars.outputs.previous_tag }} - runs-on: ububtu-latest + runs-on: ubuntu-latest steps: - name: "Checkout Repository" uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true - name: "Determine Push Branch" id: determine_vars + env: + VERSION: ${{ github.event.inputs.version }} run: | - VERSION=${{ github.event.inputs.version }} - echo "version=${VERSION}" >> $GITHUB_OUTPUT + echo "version=$VERSION" >> $GITHUB_OUTPUT PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^) echo "previous_tag=${PREVIOUS_TAG}" >> $GITHUB_OUTPUT if [[ $VERSION =~ -rc ]]; then @@ -63,124 +67,48 @@ jobs: steps: - name: "Checkout Repository" uses: actions/checkout@v4 - - - name: "Setup Python" - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: "pip" - cache-dependency-path: "requirements/_release.txt" - - - name: "Install Release Dependencies" - run: | - python -m pip install --upgrade pip - pip install -r requirements/_release.txt - - - name: "Prepare and Update CHANGELOG.md" - run: | - VERSION=${{ needs.pre_config.outputs.version }} - DATE=$(date +'%Y-%m-%d') - sed -i "s/## \[Unreleased\]/## [$VERSION] - $DATE/" CHANGELOG.md - sed -i "0,/## \[$VERSION\]/ s|## \[$VERSION\]|## [Unreleased]\n\n### Added\n\n### Changed\n\n### Fixed\n\n### Removed\n\n$&|" CHANGELOG.md - sed -i "s|\[Unreleased\]:.*|[Unreleased]: https://github.com/Pycord-Development/pycord/compare/v$VERSION...HEAD\n[$VERSION]: https://github.com/Pycord-Development/pycord/compare/v$(git describe --tags --abbrev=0 @^)...v$VERSION|" CHANGELOG.md - echo "[Unreleased]: https://github.com/Pycord-Development/pycord/compare/v$VERSION...HEAD" >> CHANGELOG.md - git add CHANGELOG.md - git commit -m "chore(release): update CHANGELOG for version $VERSION" - - - name: "Commit and Push Changelog to Master" - run: | - git config user.name "GitHub Actions" - git config user.email "actions@github.com" - git add CHANGELOG.md - git commit -m "chore(release): update CHANGELOG for version ${{ needs.pre_config.outputs.version }}" - git push origin HEAD:master - - - name: "Push Changelog to Version Branch" - run: | - git push origin HEAD:${{ needs.pre_config.outputs.branch_name }} - - - name: "Create Git Tag" - run: | - git config user.name "GitHub Actions" - git config user.email "actions@github.com" - VERSION=${{ needs.pre_config.outputs.version }} - git tag -s v$VERSION -m "Release version $VERSION" - git push origin v$VERSION - - - name: "Verify Version" - run: python -m setuptools_scm - - - name: "Build Package" - run: | - python3 -m build --sdist - python3 -m build --wheel - - - name: "Create GitHub Release" - uses: softprops/action-gh-release@v2.0.8 with: - tag_name: "v${{ needs.pre_config.outputs.version }}" - name: "v${{ needs.pre_config.outputs.version }}" - generate_release_notes: true - draft: false - prerelease: ${{ needs.pre_config.outputs.is_rc == 'true' }} - files: | - dist/*.whl - dist/*.tar.gz - token: ${{ secrets.GITHUB_TOKEN }} - make_latest: true + fetch-depth: 0 + fetch-tags: true - - name: "Publish package distributions to PyPI" - uses: pypa/gh-action-pypi-publish@v1.9.0 - env: - name: pypi - url: https://pypi.org/p/pycord + - name: "Release Pycord" + id: pycord-release + uses: Aiko-IT-Systems/pycord-lib-release-action@v1.0.0 with: - password: ${{ secrets.PYPI_TOKEN }} - - docs_release: - runs-on: ubuntu-latest - needs: [lib_release,pre_config] - if: needs.pre_config.outputs.is_rc == 'false' || (needs.pre_config.outputs.is_rc == 'true' && endsWith(needs.pre_config.outputs.version, '.0-rc1')) - environment: release - steps: - - name: "Sync Versions on Read the Docs" - run: | - curl --location --request POST 'https://readthedocs.org/api/v3/projects/pycord/sync-versions/' \ - --header 'Content-Type: application/json' \ - --header "Authorization: Token ${{ secrets.READTHEDOCS_TOKEN }}" + github-token: ${{ secrets.GITHUB_TOKEN }} + pypi-token: ${{ secrets.PYPI_TOKEN }} + version-branch-name: ${{ needs.pre_config.outputs.branch_name }} + ref: ${{ github.ref_name }} + repository: ${{ github.repository }} + python-version: "3.12" + release-requirements: "requirements/_release.txt" + version: ${{ needs.pre_config.outputs.version }} + is-rc: ${{ needs.pre_config.outputs.is_rc }} + pypi-package: "py-cord" - - name: "Activate and Show Version on Read the Docs" - run: | - VERSION=${{ needs.pre_config.outputs.version }} - MAJOR_MINOR_VERSION=$(echo $VERSION | grep -oE '^[0-9]+\.[0-9]+') - PATCH_VERSION=${VERSION##*.} - if [[ $PATCH_VERSION =~ ^[0-9]+$ ]]; then - DOCS_VERSION="v$VERSION" - else - DOCS_VERSION="v$MAJOR_MINOR_VERSION.x" - fi - curl --location --request PATCH "https://readthedocs.org/api/v3/projects/pycord/versions/$DOCS_VERSION/" \ - --header 'Content-Type: application/json' \ - --header "Authorization: Token ${{ secrets.READTHEDOCS_TOKEN }}" \ - --data '{ - "active": true, - "hidden": false - }' + - name: "Echo release url" + run: echo "${{ steps.pycord-release.outputs.gh-release }}" determine_milestone_id: runs-on: ubuntu-latest - needs: [lib_release,docs_release,pre_config] + needs: [lib_release,pre_config] if: ${{ !contains(needs.pre_config.outputs.version, '-') && endsWith(needs.pre_config.outputs.version, '.0') }} outputs: - milestone_version: ${{ steps.extract_version.outputs.milestone_version }} + old_milestone_version: ${{ steps.extract_version.outputs.old_milestone_version }} + new_milestone_version: ${{ steps.extract_version.outputs.new_milestone_version }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} environment: release steps: - name: "Extract Milestone Version" id: extract_version run: | + gh extension install valeriobelli/gh-milestone VERSION=${{ needs.pre_config.outputs.version }} - MILESTONE_VERSION=$(echo $VERSION | grep -oE '^[0-9]+\.[0-9]+') - echo "milestone_version=$MILESTONE_VERSION" >> $GITHUB_OUTPUT + OLD_MILESTONE_VERSION=$(gh milestone list --query "v2.7" | grep "#" | awk '{print $2}') + NEW_MILESTONE_VERSION="v$(echo $VERSION | grep -oE '^[0-9]+\.[0-9]+')" + echo "old_milestone_version=$OLD_MILESTONE_VERSION" >> $GITHUB_OUTPUT + echo "new_milestone_version=$NEW_MILESTONE_VERSION" >> $GITHUB_OUTPUT close_milestone: runs-on: ubuntu-latest @@ -188,42 +116,21 @@ jobs: if: ${{ !contains(needs.pre_config.outputs.version, '-') && endsWith(needs.pre_config.outputs.version, '.0') }} environment: release env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - name: "Close Milestone" - run: gh milestone edit "v${{ needs.determine_milestone_id.outputs.milestone_version }}" --state closed - - - name: "Create New Milestone" - run: | - NEW_MILESTONE_VERSION=$(echo ${{ needs.determine_milestone_id.outputs.milestone_version }} | awk -F. '{print $1"."$2+1}') - gh milestone create "v${NEW_MILESTONE_VERSION}" + - name: "Checkout Repository" + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true - - name: "Move Open Issues and PRs" + - name: "Close Milestone" run: | - gh issue list --milestone "v${{ needs.determine_milestone_id.outputs.milestone_version }}" --state open | while read issue - do - gh issue edit $issue --milestone "v${NEW_MILESTONE_VERSION}" - done + gh extension install valeriobelli/gh-milestone + OLD_MILESTONE_ID=$(gh milestone list --query "${{ needs.determine_milestone_id.outputs.old_milestone_version }}" | grep "#" | cut -d' ' -f2 | cut -d '#' -f2) + gh milestone edit $OLD_MILESTONE_ID --state closed - inform_discord: - runs-on: ubuntu-latest - needs: [lib_release,docs_release,close_milestone,pre_config] - environment: release - steps: - - name: "Notify Discord" + - name: "Create New Milestone" run: | - VERSION=${{ needs.pre_config.outputs.version }} - MAJOR_MINOR_VERSION=$(echo $VERSION | grep -oE '^[0-9]+\.[0-9]+') - DOCS_URL="" - GITHUB_COMPARE_URL="" - GITHUB_RELEASE_URL="" - PYPI_RELEASE_URL="" - ANNOUNCEMENT="## <:pycord:1063211537008955495> Pycord v${MAJOR_MINOR_VERSION} is out!\n\n" - ANNOUNCEMENT="${ANNOUNCEMENT}[@everyone]\n\n" - ANNOUNCEMENT="${ANNOUNCEMENT}You can view the changelog here: <$DOCS_URL>\n\n" - ANNOUNCEMENT="${ANNOUNCEMENT}Feel free to take a look at the [GitHub changelog]($GITHUB_COMPARE_URL), [GitHub release page]($GITHUB_RELEASE_URL) and the [PyPI release page]($PYPI_RELEASE_URL).\n\n" - ANNOUNCEMENT="${ANNOUNCEMENT}You can install this version by running the following command:\n\`\`\`sh\npip install -U py-cord==$VERSION\n\`\`\`\n\n" - curl -H "Content-Type: application/json" \ - -X POST \ - -d "{\"content\":\"$ANNOUNCEMENT\"}" \ - ${{ secrets.DISCORD_WEBHOOK_URL }} + gh extension install valeriobelli/gh-milestone + gh milestone create "${{ needs.determine_milestone_id.outputs.new_milestone_version }}" \ No newline at end of file diff --git a/README.rst b/README.rst index 19503bd234..cb387419ae 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,6 @@ .. image:: https://raw.githubusercontent.com/Pycord-Development/pycord-next/main/docs/assets/pycord-v3.png :alt: Pycord v3 + Pycord is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. ====== diff --git a/pyproject.toml b/pyproject.toml index b4662813e2..abbc5290bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools>=62.6,<=72.1.0", + "setuptools>=62.6,<=72.2.0", "setuptools-scm>=6.2,<=8.1.0", ] build-backend = "setuptools.build_meta" @@ -11,7 +11,7 @@ authors = [ {name = "Pycord Development"} ] description = "A Python wrapper for the Discord API" -readme = "README.rst" +readme = {content-type = "text/x-rst", file = "README.rst"} requires-python = ">=3.9" license = {text = "MIT"} classifiers = [ @@ -52,10 +52,12 @@ packages = [ "discord.ext.tasks", "discord.ext.pages", "discord.ext.bridge", + "discord.bin", ] [tool.setuptools.dynamic] dependencies = {file = "requirements/_.txt"} +readme = {content-type = "text/x-rst", file = "README.rst"} [tool.setuptools.dynamic.optional-dependencies] docs = {file = "requirements/docs.txt"} diff --git a/requirements/_locale.txt b/requirements/_locale.txt index 3f7eae7305..e6e31a4fe9 100644 --- a/requirements/_locale.txt +++ b/requirements/_locale.txt @@ -1,2 +1,4 @@ -r all.txt -build==1.2.1 +build>=1.2.1 +setuptools>=72.2.0 +setuptools_scm>=8.1.0 \ No newline at end of file diff --git a/requirements/_release.txt b/requirements/_release.txt new file mode 100644 index 0000000000..e09b3bb2ea --- /dev/null +++ b/requirements/_release.txt @@ -0,0 +1,5 @@ +-r all.txt +setuptools>=72.2.0 +setuptools_scm>=8.1.0 +twine>=5.1.1 +build>=1.2.1 \ No newline at end of file diff --git a/requirements/dev.txt b/requirements/dev.txt index aa7fb8afc1..db298590ba 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,7 +1,7 @@ -r _.txt pylint~=3.2.6 pytest~=8.3.2 -pytest-asyncio~=0.23.3 +pytest-asyncio~=0.23.8 # pytest-order~=1.0.1 mypy~=1.11.1 coverage~=7.6 From 1d0bc117d1f53bac420397985d49d2b4bcf498c0 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 18 Aug 2024 22:39:03 +0200 Subject: [PATCH 08/11] fix: fix eol issue --- requirements/_locale.txt | 2 +- requirements/_release.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/_locale.txt b/requirements/_locale.txt index e6e31a4fe9..c4d90559c4 100644 --- a/requirements/_locale.txt +++ b/requirements/_locale.txt @@ -1,4 +1,4 @@ -r all.txt build>=1.2.1 setuptools>=72.2.0 -setuptools_scm>=8.1.0 \ No newline at end of file +setuptools_scm>=8.1.0 diff --git a/requirements/_release.txt b/requirements/_release.txt index e09b3bb2ea..9969e06944 100644 --- a/requirements/_release.txt +++ b/requirements/_release.txt @@ -2,4 +2,4 @@ setuptools>=72.2.0 setuptools_scm>=8.1.0 twine>=5.1.1 -build>=1.2.1 \ No newline at end of file +build>=1.2.1 From b46a64d7e1143b231ed4a7da0eea1d941a51b816 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 18 Aug 2024 22:42:25 +0200 Subject: [PATCH 09/11] fix: empty commit (#2553) * empty commit * style(pre-commit): auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- docs/conf.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 1d14607daa..e0bdfa834a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -484,12 +484,10 @@ def write_new(): r"https://guide.pycord.dev/.*", r"https://pycord.dev/", r"https://pycord.dev/.*", - r"https://packages.debian.org/.*" + r"https://packages.debian.org/.*", ] -linkcheck_anchors_ignore_for_url = [ - r"https://github.com/Delitefully/DiscordLists" -] +linkcheck_anchors_ignore_for_url = [r"https://github.com/Delitefully/DiscordLists"] modindex_common_prefix = ["discord."] # suppress_warnings = ['autosectionlabel.*'] From c6e2418d4b84d6e00d192a26da1d748bae86d98d Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 18 Aug 2024 22:48:42 +0200 Subject: [PATCH 10/11] fix(actions): use marketplace action Signed-off-by: Lala Sabathil --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b3922b2f6..20df1928b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: environment: release steps: - name: "Security Check" - uses: pycord-development/execute-whitelist-action@v1.0.10 + uses: Aiko-IT-Systems/execute-whitelist-action@v1.0.0 with: whitelisted-github-ids: ${{ vars.ALLOWED_USER_IDS }} token: ${{ secrets.GITHUB_TOKEN }} @@ -133,4 +133,4 @@ jobs: - name: "Create New Milestone" run: | gh extension install valeriobelli/gh-milestone - gh milestone create "${{ needs.determine_milestone_id.outputs.new_milestone_version }}" \ No newline at end of file + gh milestone create "${{ needs.determine_milestone_id.outputs.new_milestone_version }}" From 8a09b8959b728ddb6a5bfb7d615595b7d9874f19 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 18 Aug 2024 23:00:57 +0200 Subject: [PATCH 11/11] fix(actions): re-add docs and discord step --- .github/workflows/release.yml | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 20df1928b4..1756ab300d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,6 +89,59 @@ jobs: - name: "Echo release url" run: echo "${{ steps.pycord-release.outputs.gh-release }}" + docs_release: + runs-on: ubuntu-latest + needs: [lib_release,pre_config] + if: needs.pre_config.outputs.is_rc == 'false' || (needs.pre_config.outputs.is_rc == 'true' && endsWith(needs.pre_config.outputs.version, '.0-rc1')) + environment: release + steps: + - name: "Sync Versions on Read the Docs" + run: | + curl --location --request POST 'https://readthedocs.org/api/v3/projects/pycord/sync-versions/' \ + --header 'Content-Type: application/json' \ + --header "Authorization: Token ${{ secrets.READTHEDOCS_TOKEN }}" + + - name: "Activate and Show Version on Read the Docs" + run: | + VERSION=${{ needs.pre_config.outputs.version }} + MAJOR_MINOR_VERSION=$(echo $VERSION | grep -oE '^[0-9]+\.[0-9]+') + PATCH_VERSION=${VERSION##*.} + if [[ $PATCH_VERSION =~ ^[0-9]+$ ]]; then + DOCS_VERSION="v$VERSION" + else + DOCS_VERSION="v$MAJOR_MINOR_VERSION.x" + fi + curl --location --request PATCH "https://readthedocs.org/api/v3/projects/pycord/versions/$DOCS_VERSION/" \ + --header 'Content-Type: application/json' \ + --header "Authorization: Token ${{ secrets.READTHEDOCS_TOKEN }}" \ + --data '{ + "active": true, + "hidden": false + }' + + inform_discord: + runs-on: ubuntu-latest + needs: [lib_release,docs_release,close_milestone,pre_config] + environment: release + steps: + - name: "Notify Discord" + run: | + VERSION=${{ needs.pre_config.outputs.version }} + MAJOR_MINOR_VERSION=$(echo $VERSION | grep -oE '^[0-9]+\.[0-9]+') + DOCS_URL="" + GITHUB_COMPARE_URL="" + GITHUB_RELEASE_URL="" + PYPI_RELEASE_URL="" + ANNOUNCEMENT="## <:pycord:1063211537008955495> Pycord v${MAJOR_MINOR_VERSION} is out!\n\n" + ANNOUNCEMENT="${ANNOUNCEMENT}[@everyone]\n\n" + ANNOUNCEMENT="${ANNOUNCEMENT}You can view the changelog here: <$DOCS_URL>\n\n" + ANNOUNCEMENT="${ANNOUNCEMENT}Feel free to take a look at the [GitHub changelog]($GITHUB_COMPARE_URL), [GitHub release page]($GITHUB_RELEASE_URL) and the [PyPI release page]($PYPI_RELEASE_URL).\n\n" + ANNOUNCEMENT="${ANNOUNCEMENT}You can install this version by running the following command:\n\`\`\`sh\npip install -U py-cord==$VERSION\n\`\`\`\n\n" + curl -H "Content-Type: application/json" \ + -X POST \ + -d "{\"content\":\"$ANNOUNCEMENT\"}" \ + ${{ secrets.DISCORD_WEBHOOK_URL }} + determine_milestone_id: runs-on: ubuntu-latest needs: [lib_release,pre_config]