Skip to content

Commit eb010b9

Browse files
authored
Merge branch 'main' into feat-work-objects
2 parents 696bea3 + 0a320cf commit eb010b9

File tree

10 files changed

+244
-8
lines changed

10 files changed

+244
-8
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Salesforce Open Source project configuration
2+
# Learn more: https://github.com/salesforce/oss-template
3+
#ECCN:Open Source
4+
#GUSINFO:Open Source,Open Source Workflow

.github/CODE_OF_CONDUCT.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Salesforce Open Source Community Code of Conduct
2+
3+
## About the Code of Conduct
4+
5+
Equality is a core value at Salesforce. We believe a diverse and inclusive
6+
community fosters innovation and creativity, and are committed to building a
7+
culture where everyone feels included.
8+
9+
Salesforce open-source projects are committed to providing a friendly, safe, and
10+
welcoming environment for all, regardless of gender identity and expression,
11+
sexual orientation, disability, physical appearance, body size, ethnicity, nationality,
12+
race, age, religion, level of experience, education, socioeconomic status, or
13+
other similar personal characteristics.
14+
15+
The goal of this code of conduct is to specify a baseline standard of behavior so
16+
that people with different social values and communication styles can work
17+
together effectively, productively, and respectfully in our open source community.
18+
It also establishes a mechanism for reporting issues and resolving conflicts.
19+
20+
All questions and reports of abusive, harassing, or otherwise unacceptable behavior
21+
in a Salesforce open-source project may be reported by contacting the Salesforce
22+
Open Source Conduct Committee at [email protected].
23+
24+
## Our Pledge
25+
26+
In the interest of fostering an open and welcoming environment, we as
27+
contributors and maintainers pledge to making participation in our project and
28+
our community a harassment-free experience for everyone, regardless of gender
29+
identity and expression, sexual orientation, disability, physical appearance,
30+
body size, ethnicity, nationality, race, age, religion, level of experience, education,
31+
socioeconomic status, or other similar personal characteristics.
32+
33+
## Our Standards
34+
35+
Examples of behavior that contributes to creating a positive environment
36+
include:
37+
38+
* Using welcoming and inclusive language
39+
* Being respectful of differing viewpoints and experiences
40+
* Gracefully accepting constructive criticism
41+
* Focusing on what is best for the community
42+
* Showing empathy toward other community members
43+
44+
Examples of unacceptable behavior by participants include:
45+
46+
* The use of sexualized language or imagery and unwelcome sexual attention or
47+
advances
48+
* Personal attacks, insulting/derogatory comments, or trolling
49+
* Public or private harassment
50+
* Publishing, or threatening to publish, others' private information—such as
51+
a physical or electronic address—without explicit permission
52+
* Other conduct which could reasonably be considered inappropriate in a
53+
professional setting
54+
* Advocating for or encouraging any of the above behaviors
55+
56+
## Our Responsibilities
57+
58+
Project maintainers are responsible for clarifying the standards of acceptable
59+
behavior and are expected to take appropriate and fair corrective action in
60+
response to any instances of unacceptable behavior.
61+
62+
Project maintainers have the right and responsibility to remove, edit, or
63+
reject comments, commits, code, wiki edits, issues, and other contributions
64+
that are not aligned with this Code of Conduct, or to ban temporarily or
65+
permanently any contributor for other behaviors that they deem inappropriate,
66+
threatening, offensive, or harmful.
67+
68+
## Scope
69+
70+
This Code of Conduct applies both within project spaces and in public spaces
71+
when an individual is representing the project or its community. Examples of
72+
representing a project or community include using an official project email
73+
address, posting via an official social media account, or acting as an appointed
74+
representative at an online or offline event. Representation of a project may be
75+
further defined and clarified by project maintainers.
76+
77+
## Enforcement
78+
79+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
80+
reported by contacting the Salesforce Open Source Conduct Committee
81+
at [email protected]. All complaints will be reviewed and investigated
82+
and will result in a response that is deemed necessary and appropriate to the
83+
circumstances. The committee is obligated to maintain confidentiality with
84+
regard to the reporter of an incident. Further details of specific enforcement
85+
policies may be posted separately.
86+
87+
Project maintainers who do not follow or enforce the Code of Conduct in good
88+
faith may face temporary or permanent repercussions as determined by other
89+
members of the project's leadership and the Salesforce Open Source Conduct
90+
Committee.
91+
92+
## Attribution
93+
94+
This Code of Conduct is adapted from the [Contributor Covenant][contributor-covenant-home],
95+
version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html.
96+
It includes adaptions and additions from [Go Community Code of Conduct][golang-coc],
97+
[CNCF Code of Conduct][cncf-coc], and [Microsoft Open Source Code of Conduct][microsoft-coc].
98+
99+
This Code of Conduct is licensed under the [Creative Commons Attribution 3.0 License][cc-by-3-us].
100+
101+
[contributor-covenant-home]: https://www.contributor-covenant.org (https://www.contributor-covenant.org/)
102+
[golang-coc]: https://golang.org/conduct
103+
[cncf-coc]: https://github.com/cncf/foundation/blob/master/code-of-conduct.md
104+
[microsoft-coc]: https://opensource.microsoft.com/codeofconduct/
105+
[cc-by-3-us]: https://creativecommons.org/licenses/by/3.0/us/

.github/CONTRIBUTING.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Contributors Guide
2+
3+
Interested in contributing? Awesome! Before you do though, please read our [Code of Conduct](https://github.com/slack-samples/bolt-python-examples/blob/main/.github/CODE_OF_CONDUCT.md). We take it very seriously, and expect that you will as well.
4+
5+
There are many ways you can contribute! :heart:
6+
7+
### Bug Reports and Fixes :bug:
8+
9+
- If you find a bug, please search for it in the [Issues](https://github.com/slack-samples/bolt-python-examples/issues), and if it isn't already tracked, [create a new issue](https://github.com/slack-samples/bolt-python-examples/issues/new). Fill out the "Bug Report" section of the issue template. Even if an Issue is closed, feel free to comment and add details, it will still be reviewed.
10+
- Issues that have already been identified as a bug (note: able to reproduce) will be labelled `bug`.
11+
- Issues that are related to the examples apps will be labelled `area:examples`.
12+
- If you'd like to submit a fix for a bug, [send a Pull Request](#creating-a-pull-request) and mention the Issue number.
13+
- Include tests that isolate the bug and verifies that it was fixed.
14+
15+
### New Features :bulb:
16+
17+
- If you'd like to add new functionality to this project, describe the problem you want to solve in a [new Issue](https://github.com/slack-samples/bolt-python-examples/issues/new).
18+
- Issues that have been identified as a feature request will be labelled `enhancement`.
19+
- Issues that are related to the examples apps will be labelled `area:examples`.
20+
- If you'd like to implement the new feature, please wait for feedback from the project maintainers before spending too much time writing the code. In some cases, `enhancement`s may not align well with the project objectives at the time.
21+
22+
### Tests :mag:, Documentation :books:, Miscellaneous :sparkles:
23+
24+
- If you'd like to improve the tests, you want to make the documentation clearer, you have an alternative implementation of something that may have advantages over the way its currently done, or you have any other change, we would be happy to hear about it!
25+
- If its a trivial change, go ahead and [send a Pull Request](#creating-a-pull-request) with the changes you have in mind.
26+
- If not, [open an Issue](https://github.com/slack-samples/bolt-python-examples/issues/new) to discuss the idea first.
27+
28+
If you're new to our project and looking for some way to make your first contribution, look for Issues labelled `good first contribution`.
29+
30+
## Requirements
31+
32+
For your contribution to be accepted:
33+
34+
- [x] You must have signed the [Contributor License Agreement (CLA)](https://cla.salesforce.com/sign-cla).
35+
- [x] The test suite must be complete and pass.
36+
- [x] The changes must be approved by code review.
37+
- [x] Commits should be atomic and messages must be descriptive. Related issues should be mentioned by Issue number.
38+
39+
If the contribution doesn't meet the above criteria, you may fail our automated checks or a maintainer will discuss it with you. You can continue to improve a Pull Request by adding commits to the branch from which the PR was created.
40+
41+
[Interested in knowing more about about pull requests at Slack?](https://slack.engineering/on-empathy-pull-requests-979e4257d158#.awxtvmb2z)
42+
43+
## Creating a Pull Request
44+
45+
1. :fork_and_knife: Fork the repository on GitHub.
46+
2. :runner: Clone/fetch your fork to your local development machine. It's a good idea to run the tests just to make sure everything is in order.
47+
3. :herb: Create a new branch and check it out.
48+
4. :crystal_ball: Make your changes and commit them locally. Magic happens here!
49+
5. :arrow_heading_up: Push your new branch to your fork. (e.g. `git push username fix-issue-16`).
50+
6. :inbox_tray: Open a Pull Request on github.com from your new branch on your fork to `main` in this repository.

.github/MAINTAINERS_GUIDE.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Maintainers Guide
2+
3+
Let's hope to have matching examples of documentation and reference for various runtimes be consistent!
4+
5+
- **[Development](#development)**: Making changes alongside the Node Slack SDK.
6+
- **[Commands](#commands)**: Reference to running example code of this project.
7+
- **[Structure](#structure)**: Adding examples for features of the Slack Platform.
8+
9+
## Development
10+
11+
Bringing ongoing changes from the [Python Slack SDK](https://github.com/slackapi/python-slack-sdk) requires building from source with these commands:
12+
13+
```sh
14+
$ git clone [email protected]:slackapi/python-slack-sdk.git
15+
$ cd python-slack-sdk
16+
$ python -m venv .venv
17+
$ source .venv/bin/activate
18+
(.venv) $ ./scripts/build_pypi_package.sh
19+
```
20+
21+
This bundles a compilation as a `slack_sdk-*-py2.py3-none-any.whl` file that is used to replace previous installations:
22+
23+
```sh
24+
$ git clone [email protected]:slack-samples/bolt-python-examples.git
25+
$ cd bolt-python-examples
26+
$ cd block-kit # Navigate to an example to change
27+
$ python -m venv .venv
28+
$ source .venv/bin/activate
29+
(.venv) $ pip install -r requirements.txt
30+
(.venv) $ pip install /path/to/python-slack-sdk/dist/slack_sdk-*-py2.py3-none-any.whl --force-reinstall
31+
```
32+
33+
## Commands
34+
35+
Each example has matching commands to run tests:
36+
37+
```sh
38+
$ ruff check
39+
$ ruff format --diff --check
40+
$ mypy ./**/*.py
41+
$ pytest -v
42+
```
43+
44+
## Structure
45+
46+
New code snippets or samples added should match the structure of the [docs.slack.dev](https://docs.slack.dev) site:
47+
48+
```txt
49+
|- .github
50+
|- dependabot.yml # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/controlling-dependencies-updated#defining-multiple-locations-for-manifest-files
51+
|- block-kit
52+
|- blocks # https://docs.slack.dev/reference/block-kit/blocks
53+
|- formatting # https://docs.slack.dev/block-kit/formatting-with-rich-text
54+
|- messaging
55+
|- sending # https://docs.slack.dev/messaging/sending-and-scheduling-messages
56+
|- work-objects # https://docs.slack.dev/messaging/work-objects
57+
```
58+
59+
Some pages might reference distinct examples needing unique app manifests. These should appear in separate nested directories for a minimal demonstration.
60+
61+
Certain features or demonstrations might not have a clear example on the docs site. Discussions with the kind documentation team ought be started if so! We hope folks find relevant examples through those pages.
62+
63+
A goal of this project is to be a source of tested reference.

.github/SECURITY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Security
2+
3+
Please report any security issue to [[email protected]](mailto:[email protected])
4+
as soon as it is discovered. This library limits its runtime dependencies in
5+
order to reduce the total cost of ownership as much as can be, but all consumers
6+
should remain vigilant and have their security stakeholders review all third-party
7+
products (3PP) like this one and their dependencies.

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ on:
66
pull_request:
77
jobs:
88
test:
9-
name: "pytest@python3.13"
9+
name: "pytest@python3.14"
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
1313
showcase:
1414
- "block-kit"
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@v6
1818
- name: Install Python
1919
uses: actions/setup-python@v6
2020
with:
21-
python-version: "3.13"
21+
python-version: "3.14"
2222
- name: Run tests
2323
run: |
2424
cd "${{ matrix.showcase }}"

LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This is free and unencumbered software released into the public domain.
2+
3+
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
4+
5+
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Bolt for Python Showcase
1+
# Bolt for Python Examples
22

33
This collections of examples highlights features of a Slack app in the language of Bolt for Python.
44

block-kit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Read the [docs](https://docs.slack.dev/block-kit/) to learn concepts behind thes
99
### Blocks
1010

1111
- **[Actions](https://docs.slack.dev/reference/block-kit/blocks/actions-block)**: Holds multiple interactive elements. [Implementation](./src/blocks/actions.py).
12-
- **[Context actions](https://docs.slack.dev/reference/block-kit/blocks/context-actions-block)**: Holds interactive elements like feedback buttons and icon buttons. [Implementation](./src/blocks/context_actions.py).
12+
- **[Context actions](https://docs.slack.dev/reference/block-kit/blocks/context-actions-block)**: Displays actions as contextual info, which can include both feedback buttons and icon buttons. [Implementation](./src/blocks/context_actions.py).
1313
- **[Context](https://docs.slack.dev/reference/block-kit/blocks/context-block)**: Provides contextual info, which can include both images and text. [Implementation](./src/blocks/context.py).
1414
- **[Divider](https://docs.slack.dev/reference/block-kit/blocks/divider-block)**: Visually separates pieces of info inside of a message. [Implementation](./src/blocks/divider.py).
1515
- **[File](https://docs.slack.dev/reference/block-kit/blocks/file-block)**: Displays info about remote files. [Implementation](./src/blocks/file.py).

block-kit/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mypy==1.18.2
1+
mypy==1.19.0
22
pytest==9.0.1
3-
ruff==0.14.5
4-
slack_sdk==3.38.0
3+
ruff==0.14.7
4+
slack_sdk==3.39.0

0 commit comments

Comments
 (0)