chore: cleanup, ci workflows and formatting (#127064)

* ci: setup workflows, dependabot, labeler and commit linting

* docs: update README, community files and issue templates

* chore: configure prettier, editorconfig and format codebase

* chore: restore changes lost during rebase

* docs: adjust url for new logo

* fix: align badges

* chore: resolve conflicts and re-add temp lint
This commit is contained in:
2^1 2026-03-10 00:45:12 +01:00 • committed by GitHub
commit 807efd502d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
94 changed files with 6790 additions and 3547 deletions

133
.github/CODE_OF_CONDUCT.md vendored Normal file
View file

@ -0,0 +1,133 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[pedroslopez@me.com][email].
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].
[email]: mailto:pedroslopez@me.com
[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

204
.github/COMMIT_CONVENTION.md vendored Normal file
View file

@ -0,0 +1,204 @@
# Git Commit Message Convention
> This is adapted from [Angular's commit convention][angular-commit-convention].
Messages must be matched by the following regex (case-insensitive):
```ts
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types|infra)(\(.+\))?!?: .{1,72}/i;
```
The commit type is **case-insensitive** — `feat`, `Feat`, and `FEAT` are all valid.
## Examples
### Features
Appears under "Features" header, message subheader:
```txt
feat(message): add 'downloadMedia' option
```
Additional examples:
```txt
feat(chat): add ability to pin messages
```
```txt
feat(contact): add getProfilePicUrl method
```
### Bug Fixes
Appears under "Bug Fixes" header, client subheader, with a link to issue #28:
```txt
fix(client): stop client breaking when QR code expires
Closes #28
```
Additional examples:
```txt
fix(message): handle media messages without caption correctly
```
```txt
fix(auth): resolve authentication timeout on slow connections
```
### Performance Improvements
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
```txt
perf(message): remove legacyMode option
BREAKING CHANGE: The legacyMode option has been removed. The new message handling is always used for performance reasons.
```
Additional example:
```txt
perf(client): optimize event listener registration
```
### Documentation
```txt
docs(readme): update installation instructions
```
```txt
docs(api): add examples for message reactions
```
### Code Refactoring
```txt
refactor(client): simplify authentication flow
```
```txt
refactor(structures): extract common message properties
```
### Tests
```txt
test(message): add unit tests for media download
```
```txt
test(client): add integration tests for reconnection
```
### Build System
```txt
build(deps): update puppeteer to v21.0.0
```
```txt
build(webpack): optimize bundle size
```
### Continuous Integration
```txt
ci(actions): add automated release workflow
```
```txt
ci(tests): run tests on multiple node versions
```
### Chores
```txt
chore(gitignore): ignore .vscode directory
```
```txt
chore(deps): bump dependencies to latest versions
```
### Type Definitions
```txt
types(message): add missing type for MessageMedia
```
```txt
types(client): improve ClientOptions interface
```
### Code Style
```txt
style(client): fix indentation and spacing
```
### Reverts
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header:
```txt
revert: feat(message): add 'downloadMedia' option
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
```
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
```txt
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
The **header** is mandatory and the **scope** of the header is optional.
## Revert
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
## Type
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
Other prefixes are up to your discretion. Suggested prefixes are `build`, `ci`, `docs`, `style`, `refactor`, and `test` for non-changelog related tasks.
## Scope
The scope could be anything specifying place of the commit change. For example `client`, `message`, `chat`, `contact`, `media`, `auth`, etc...
## Subject
The subject contains succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter
- no dot (.) at the end
## Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
## Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
A detailed explanation can be found in this [document][commit-message-format].
[angular-commit-convention]: https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#

43
.github/CONTRIBUTING.md vendored Normal file
View file

@ -0,0 +1,43 @@
# Contributing
If you want to contribute to whatsapp-web.js, start by forking the repository and opening a pull request with your changes. The project uses ESLint and Prettier to enforce a consistent coding style, so setting them up in your development environment is recommended to ensure your contributions meet the formatting standards.
## Questions
Do not open issues for general questions or support requests. For help, please join the [Discord Server][discord] instead. Installation instructions and general guidance are available in the documentation. Issues opened for questions will be closed.
### Issue Tracker
Before creating a new issue, review the existing [issue tracker][issue-tracker] to avoid duplicates.
## Issues and Pull Requests
- **Bug reports** must include a minimal reproduction and clear steps to reproduce the problem.
- **Feature requests** should clearly describe the use case and explain why the feature belongs in the library.
- **Pull requests and commit messages** must follow the conventional commit format for both commit messages and the PR title (e.g. `feat(client): add sendMessage option`). The commit type is case-insensitive (`feat`, `Feat`, and `FEAT` are all valid).
- All pull requests should target the `main` branch unless discussed otherwise.
- Ensure that linting and tests pass before submitting your pull request.
## Setup
To prepare your development environment:
1. Fork and clone the repository, and ensure you are on the `main` branch.
2. Run `npm install` to install all dependencies.
3. Implement your changes or improvements.
4. Run `npm run check` to execute ESLint and Prettier checks.
5. Run `npm test` to ensure the test suite passes.
6. Submit a pull request (make sure it follows the conventional commit format).
## Testing Locally
To test your changes within your own project:
1. Clone the repository and apply your modifications.
2. Run `npm install` inside the cloned directory.
3. In your project, run `npm link <path-to-your-clone>` to create a symlink to your local version.
4. Import the package and verify your changes.
5. If everything works as expected, you’ve successfully implemented your changes without breaking the library.
[discord]: https://discord.wwebjs.dev/
[issue-tracker]: https://github.com/pedroslopez/whatsapp-web.js/issues

9
.github/DISCLAIMER.md vendored Normal file
View file

@ -0,0 +1,9 @@
# Disclaimer
This project is an unofficial library and is not affiliated with, endorsed by, maintained, authorized, or sponsored by WhatsApp Inc., Meta Platforms, or any of their subsidiaries or affiliates. Use of this library and any related components is entirely at your own risk. WhatsApp prohibits the use of unofficial clients, reverse-engineered integrations, automated bots, or other non-official methods of access to its platform, and using this library may violate WhatsApp’s Terms of Service, potentially resulting in temporary or permanent suspension of your WhatsApp account or other enforcement actions. We assume no responsibility or liability if your account is restricted, suspended, or permanently banned, and you are solely responsible for any consequences arising from the use or misuse of this project.
The maintainers and contributors provide this library without any guarantees or warranties, express or implied, regarding its reliability, functionality, or long-term viability. Compatibility with WhatsApp’s private or internal APIs may change at any time without notice, which could cause the library to stop functioning or behave unpredictably. This project has been developed strictly for educational, research, experimental, and hobby purposes and should not be used in commercial, production, or business-critical environments without fully understanding and accepting the associated risks.
For official, secure, and policy-compliant integrations, individuals and businesses are strongly encouraged to use the WhatsApp Business Platform or other authorized APIs provided directly by WhatsApp or Meta. The official WhatsApp website is available at [https://www.whatsapp.com][whatsapp]. "WhatsApp" and all related names, marks, logos, and images are registered trademarks of their respective owners. By using this project, you acknowledge that you understand and accept all of the above terms, limitations, and potential risks, including the possibility of account suspension or banning.
[whatsapp]: https://www.whatsapp.com

2
.github/FUNDING.yml vendored
View file

@ -1,3 +1,3 @@
github: [pedroslopez, PurpShell]
ko_fi: pedroslopez
custom: ["paypal.me/psla", "buymeacoff.ee/pedroslopez"]
custom: ['paypal.me/psla', 'buymeacoff.ee/pedroslopez']

164
.github/ISSUE_TEMPLATE/01-bug_report.yml vendored Normal file
View file

@ -0,0 +1,164 @@
name: Bug Report
description: Report a bug in the library or another package
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please check the [issue tracker](https://github.com/wwebjs/wwebjs/issues) before submitting.
> [!CAUTION]
> - **Report only issues related to the `whatsapp-web.js` library!**
> - **Any issue without a clear reproduction will be closed!**
> - **Any issue opened as a question will be closed!**
> - **Duplicate issues will be closed.**
- type: dropdown
id: priority
attributes:
label: Issue Priority
description: Be realistic. Elaborate in the description if needed.
options:
- Low (slightly annoying)
- Medium (should be fixed soon)
- High (immediate attention needed)
default: 0
validations:
required: true
- type: textarea
id: description
attributes:
label: Issue Description
description: Provide a clear and concise description of the problem.
placeholder: |
When I try to send a message, the client disconnects unexpectedly...
validations:
required: true
- type: textarea
id: reproduction_steps
attributes:
label: Steps To Reproduce
description: How can we reproduce this issue?
placeholder: |
1. Do this
2. Do that
...
9. See error
validations:
required: true
- type: textarea
id: code_sample
attributes:
label: Code Sample
description: |
Provide code that reproduces the bug. Ensure it is:
- **Minimal** - Only essential code to show the issue
- **Complete** - Include all dependencies and setup
- **Tested** - Verify it actually triggers the problem
Will be auto-formatted - no backticks needed.
render: typescript
validations:
required: false
- type: dropdown
id: whatsapp_type
attributes:
label: WhatsApp Account Type
description: What type of WhatsApp account are you using?
options:
- Standard
- WhatsApp Business
validations:
required: true
- type: dropdown
id: auth_type
attributes:
label: Authentication Strategy
description: What authenctication strategy are you using?
options:
- LocalAuth
- RemoteAuth
- NoAuth
validations:
required: true
- type: input
id: lib_version
attributes:
label: whatsapp-web.js Version
description: What library version are you using? Check it in `package.json` file.
placeholder: 1.31.0
validations:
required: true
- type: input
id: wweb_version
attributes:
label: WhatsApp Web Version
description: 'What WhatsApp Web version are you using? Use: `await client.getWWebVersion()`'
placeholder: 2.3000.1017054665
validations:
required: true
- type: input
id: browser_type
attributes:
label: Browser Type
description: What web browser are you using?
placeholder: Chromium / Google Chrome / Edge / ...
validations:
required: true
- type: input
id: browser_version
attributes:
label: Browser Version
description: What version of the browser are you using?
placeholder: 120.0.6099.71
validations:
required: true
- type: input
id: computer_os
attributes:
label: Computer OS Version
description: What OS are you using?
placeholder: MacOS 15 / Windows 11 / Ubuntu 24 / ...
validations:
required: true
- type: input
id: phone_os
attributes:
label: Phone OS Version
description: What OS version are you using on your phone?
placeholder: Android 12 / iOS 15.4 / ...
validations:
required: true
- type: input
id: node_version
attributes:
label: Node.js Version
description: What Node.js version are you using? Run `node -v` in your terminal.
placeholder: 18.16.0
validations:
required: true
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: '**I use the latest released version of whatsapp-web.js.**'
required: true
- label: I have searched existing issues and confirmed this is not a duplicate.
required: true
- label: I have verified this is a library issue, not a problem with my code.
required: true

View file

@ -0,0 +1,55 @@
name: Feature Request
description: Request a new feature for our applications or packages
labels: [feature request]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to suggest a feature! Please search the [issue tracker](https://github.com/wwebjs/wwebjs/issues) first to avoid duplicates.
> [!CAUTION]
> - **Please submit only feature requests that related to the `whatsapp-web.js` library.**
> - **Any feature request opened as a question will be closed!**
> - **Duplicate issues will be closed.**
- type: textarea
id: description
attributes:
label: Feature summary
description: Briefly describe the problem/use case and desired capability.
placeholder: |
Problem: ...
Benefit: ...
Outcome: ...
validations:
required: true
- type: textarea
id: solution
attributes:
label: Ideal solution or implementation
description: How should this feature work? Include examples like API shape, UX sketches.
placeholder: |
API: client.xyz(...)
Event: client.on('xyz', ...)
Example: const r = await client.xyz()
Compatibility: Breaking changes?
render: markdown
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives / Additional context
description: Alternatives or workarounds? / More notes/links/screenshots.
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: I have searched existing issues and confirmed this is not a duplicate.
required: true
- label: This request is within the scope of WhatsApp Web capabilities.
required: false

View file

@ -1,140 +0,0 @@
name: '🐛 Bug Report'
description: Create a report to help us improve
labels: bug
body:
- type: markdown
attributes:
value: |
### Thank you for reporting an issue.
### Here are some important points to consider before submitting a new bug or issue:
- Please report only issues related to the `whatsapp-web.js` library.
- Duplicate issues will be closed.
- Any issue opened as a question will be closed.
### If you have any question about how to achieve something and are struggling, please post a question in our [Discord Server](https://discord.gg/wyKybbF) instead.
### Please check the links below to see if you can find a solution there:
- [Open Issues](https://github.com/pedroslopez/whatsapp-web.js/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
- [Closed Issues](https://github.com/pedroslopez/whatsapp-web.js/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed)
- [Library Documentation](https://docs.wwebjs.dev/)
- [Guide](https://wwebjs.dev/guide)
- [JavaScript Guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide)
- [Node.js Documentation](https://nodejs.org/en/docs/)
### The more information you fill in, the better the community can help you.
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues.
required: true
- type: checkboxes
attributes:
label: Is this a problem caused by your code, or is it specifically because of the library?
description: Please check your code once again to make sure it is correct.
options:
- label: I have double-checked my code carefully.
required: true
- type: textarea
id: description
attributes:
label: Describe the bug.
description: Provide a clear and concise description of the challenge you are running into.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: Provide a clear and concise description of what you expected to happen.
placeholder: |
As a user, I expected ___ behavior, but I am seeing ___
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to Reproduce the Bug or Issue
description: Describe the steps we have to take to reproduce the behavior. Additionally, **please include the code snippet you used.** Use [syntax highlighting](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) for more readability.
placeholder: |
Your steps to reproduce the bug here...
```js
// your code here
```
validations:
required: true
- type: dropdown
id: whatsapp_type
attributes:
label: WhatsApp Account Type
options:
- Standard
- WhatsApp Business
validations:
required: true
- type: input
id: browser_type
attributes:
label: Browser Type
description: What web browser are you using? **Also provide the browser version.**
placeholder: Chromium | Google Chrome | other (provide the type)
validations:
required: true
- type: input
id: os
attributes:
label: Operation System Type
description: What OS are you using? **Also provide its version.**
placeholder: Mac | Windows | Linux | Docker + Ubuntu | other (provide the type)
validations:
required: true
- type: input
id: phone_os
attributes:
label: Phone OS Type
description: What OS are you using on your phone? **Also provide its version.**
placeholder: Android | iOS | other (provide the type)
validations:
required: true
- type: input
id: lib_version
attributes:
label: WhatsApp-Web.js Version
description: What library version are you using? Check it in `package.json` file.
validations:
required: true
- type: input
id: wweb_version
attributes:
label: WhatsApp Web Version
description: What WhatsApp Web version are you using? Run `await client.getWWebVersion()`.
validations:
required: true
- type: input
id: node_version
attributes:
label: Node.js Version
description: What Node.js version are you using? Run `node -v` in your terminal.
validations:
required: true
- type: dropdown
id: auth_type
attributes:
label: Authentication Strategy
description: What authenctication strategy are you using?
options:
- LocalAuth
- RemoteAuth
- NoAuth
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context about the problem here.

View file

@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Official WWebJS Discord Server
url: https://discord.gg/H7DqQs4
about: Please ask and answer questions here.
- name: Discord Server
url: https://discord.wwebjs.dev
about: Please ask and answer questions here.

View file

@ -1,71 +0,0 @@
name: 🚀 Feature Request
description: Suggest an idea for this project
labels: enhancement
body:
- type: markdown
attributes:
value: |
### Thank you for suggesting a new idea for this project.
### Here are some important points to consider before continuing:
- Please submit only feature requests that related to the `whatsapp-web.js` library.
- Duplicate feature requests will be closed.
- Any feature request opened as a question will be closed.
### If you have any question about how to achieve something and are struggling, please post a question in our [Discord Server](https://discord.gg/wyKybbF) instead.
### Please check the links below to see if you can find a solution there:
- [Open Pull Requests](https://github.com/pedroslopez/whatsapp-web.js/pulls?q=is%3Apr+is%3Aopen+-author%3Aapp%2Fdependabot)
- [Merged Pull Requests](https://github.com/pedroslopez/whatsapp-web.js/pulls?q=is%3Apr+is%3Amerged+-author%3Aapp%2Fdependabot)
- [Library Documentation](https://docs.wwebjs.dev/)
- [Guide](https://wwebjs.dev/guide)
- [JavaScript Guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide)
- [Node.js Documentation](https://nodejs.org/en/docs/)
- type: checkboxes
attributes:
label: Is the feature you are looking for already implemented in the library?
description: Please check to see if an issue related to this feature request has [already been implemented](https://github.com/pedroslopez/whatsapp-web.js/pulls?q=is%3Apr+is%3Amerged+-author%3Aapp%2Fdependabot).
options:
- label: I have reviewed the implemented features.
required: true
- type: checkboxes
attributes:
label: Is your "solution" already implemented in an opened pull request?
description: Please check the [open pull requests](https://github.com/pedroslopez/whatsapp-web.js/pulls?q=is%3Apr+is%3Aopen+-author%3Aapp%2Fdependabot) to see if there is already an issue related to this feature request.
options:
- label: I have reviewed the existing pull requests.
required: true
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
description: A concise description of the problem you are facing or the motivation behind this feature request.
placeholder: I faced a problem due to...
validations:
required: false
- type: textarea
attributes:
label: Describe the solution you'd like.
description: A concise description of the solution for the issue.
validations:
required: true
- type: textarea
attributes:
label: Describe an alternate solution if you have one.
description: Is there any other approach to solve the problem?
validations:
required: false
- type: textarea
attributes:
label: Additional Context
description: |
Links? Screenshots? References? Anything that will give us more context about what you would like to see!
validations:
required: false

10
.github/SUPPORT.md vendored Normal file
View file

@ -0,0 +1,10 @@
# Need Help?
This issue tracker is **only** for bug reports and feature requests.
For questions and general help, please join our **Discord server**: [https://discord.wwebjs.dev][discord].
Installation instructions and guidance can be found in the documentation.
Issues that are not bug reports, feature requests or questions will be closed.
[discord]: https://discord.wwebjs.dev

View file

@ -1,7 +1,11 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
open-pull-requests-limit: 10
schedule:
interval: "monthly"
- package-ecosystem: 'npm'
directory: '/'
open-pull-requests-limit: 10
schedule:
interval: 'monthly'
labels:
- 'dependencies'
- 'dependabot'
target-branch: 'main'

24
.github/issue-labeler.yml vendored Normal file
View file

@ -0,0 +1,24 @@
documentation:
- "\\b(doc|docs|readme|documentation|typo|example|guide)s?\\b"
security:
- "\\b(vulnerability|xss|csrf|security|exploit|attack|inject)s?\\b"
performance:
- "\\b(performance|slow|memory|cpu|optimize|optimization|lag|leak)s?\\b"
breaking change:
- "\\bbreaking.?changes?\\b"
dependencies:
- "\\b(depend(enc)?y|dependencies|deps?|package|upgrade|bump)s?\\b"
typings:
- "\\b(type|types|typing|typings|typescript|\\.d\\.ts)s?\\b"
tests:
- "\\b(test|tests|testing|spec|mocha|assert|coverage)s?\\b"
ci:
- "\\b(ci|workflow|pipeline|action|github.?action|continuous.?integration)s?\\b"
build:
- "\\b(build|builds|build.?system|webpack|rollup|esbuild|gulp|grunt)s?\\b"
infra:
- "\\b(infra|infrastructure|devops|docker|kubernetes|cloud|aws|azure|gcp)s?\\b"
styles:
- "\\b(style|styles|format|lint|prettier|eslint)s?\\b"
ui:
- "\\b(ui|ux|interface|design|layout|responsive)s?\\b"

148
.github/labels.yml vendored Normal file
View file

@ -0,0 +1,148 @@
# Issue Labels
- name: 'bug'
color: '#d73a4a'
description: 'Something is broken'
- name: 'feature request'
color: '#a2eeef'
description: 'Request for a new feature'
# Status Labels
- name: 'in progress'
color: '#fbca04'
description: 'Work in progress'
- name: 'in review'
color: '#0e8a16'
description: 'Awaiting review'
- name: 'merge ready'
color: '#0e8a16'
description: 'Ready to merge'
- name: 'blocked'
color: '#d13917'
description: 'Blocked by another issue'
- name: 'discussion'
color: '#d876e3'
description: 'Needs discussion'
- name: 'approved'
color: '#11EA91'
description: 'Confirmed by maintainers'
- name: 'stale'
color: '#bfd4f2'
description: 'Inactive for a while'
- name: 'waiting for a response'
color: '#BE4422'
description: 'Waiting for author response'
- name: 'waiting for testers'
color: '#7d006a'
description: 'Needs testing'
# Priority & Help
- name: 'good first issue'
color: '#7057ff'
description: 'Beginner-friendly issue'
- name: 'help wanted'
color: '#008672'
description: 'Community help needed'
- name: 'high priority'
color: '#00DFA8'
description: 'Important issue'
# Bug Issues
- name: 'issued low'
color: '#d4c5f9'
description: 'Low impact issue'
- name: 'issued medium'
color: '#d4c5f9'
description: 'Medium impact issue'
- name: 'issued high'
color: '#d4c5f9'
description: 'High impact issue'
# Resolution
- name: 'duplicate'
color: '#cfd3d7'
description: 'Already reported'
- name: 'invalid'
color: '#e4e669'
description: 'Not a valid issue'
- name: 'wontfix'
color: '#ffffff'
description: 'Will not be fixed'
# Type of Change
- name: 'api changes'
color: '#5319e7'
description: 'API modifications'
- name: 'dependencies'
color: '#0366d6'
description: 'Dependency updates'
- name: 'security'
color: '#ee0701'
description: 'Security related'
- name: 'performance'
color: '#ff6b6b'
description: 'Performance improvements'
- name: 'error handling'
color: '#f9d0c4'
description: 'Error handling updates'
- name: 'typings'
color: '#1d76db'
description: 'Type definitions'
- name: 'interactions'
color: '#c5def5'
description: 'Interaction changes'
- name: 'breaking change'
color: '#E9314A'
description: 'Breaks existing behavior'
# Bots & Automation
- name: 'dependabot'
color: '#0366d6'
description: 'Dependabot PR'
- name: 'depfu'
color: '#0000ff'
description: 'Depfu PR'
# Code & Build
- name: 'tests'
color: '#bfd4f2'
description: 'Test related'
- name: 'build'
color: '#0075ca'
description: 'Build system'
- name: 'ci'
color: '#0075ca'
description: 'CI pipeline'
- name: 'infra'
color: '#d4c5f9'
description: 'Infrastructure'
- name: 'styles'
color: '#ffc0cb'
description: 'Code style'
- name: 'ui'
color: '#ffaad4'
description: 'UI changes'
- name: 'utility'
color: '#ededed'
description: 'Utility code'
- name: 'chore'
color: '#fef2c0'
description: 'Maintenance task'
# Quality & Review
- name: 'AI pr'
color: '#b60205'
description: 'AI-assisted PR; Review very carefully!'
- name: 'bad pr'
color: '#B60205'
description: 'Below project standards'
# Project Specific
- name: 'docs'
color: '#0075ca'
description: 'Documentation changes'
- name: 'whatsapp bug'
color: '#1d76db'
description: 'WhatsApp Web bug'
- name: 'whatsapp change'
color: '#25D366'
description: 'WhatsApp Web change'

65
.github/pr-labeler.yml vendored Normal file
View file

@ -0,0 +1,65 @@
api changes:
- changed-files:
- any-glob-to-any-file:
- src/*
- src/**/*
dependencies:
- changed-files:
- any-glob-to-any-file:
- package.json
- package-lock.json
tests:
- changed-files:
- any-glob-to-any-file:
- tests/*
- tests/**/*
docs:
- changed-files:
- any-glob-to-any-file:
- docs/*
- docs/**/*
- '**/*.md'
- .jsdoc.json
infra:
- changed-files:
- any-glob-to-any-file:
- .github/*
- .github/**/*
ci:
- changed-files:
- any-glob-to-any-file:
- .github/workflows/*
- .github/workflows/**/*
typings:
- changed-files:
- any-glob-to-any-file:
- index.d.ts
- '**/*.d.ts'
utility:
- changed-files:
- any-glob-to-any-file:
- src/util/*
- src/util/**/*
build:
- changed-files:
- any-glob-to-any-file:
- tools/*
- tools/**/*
- .eslintrc.json
- .eslintignore
- .prettierrc.json
- .prettierignore
- .editorconfig
- .gitignore
- .gitattributes
- .commitlint.config.js
chore:
- changed-files:
- any-glob-to-any-file:
- .env.example
- .npmignore
- LICENSE
- .github/FUNDING.yml
- .github/CODE_OF_CONDUCT.md
- .github/ISSUE_TEMPLATE/*
- .github/pull_request_template.md

View file

@ -1,53 +1,79 @@
# PR Details
<!-- Provide here a general summary of your changes. -->
## Description
<!-- Describe here your changes in detail. -->
<!-- What does this PR change and why? -->
## Related Issue(s)
<!-- Optional --->
<!-- If there is an issue related to the PR, link it here using a 'closes' keyword, for example: -->
<!-- closes #XXXX (where the XXXX is an issue number) -->
<!-- If there are multiple issues, link them as follows: -->
<!-- closes #XXXX closes #YYYY closes #ZZZZ -->
<!-- See more here: https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword -->
<!--
If this pull request relates to one or more GitHub issues, link them using GitHub's closing keywords to automatically close the issues upon merging.
## Motivation and Context
Examples:
closes #123
fixes #456
resolves #789
<!-- Optional --->
<!-- Why is this change required? What problem does it solve? -->
For more details, see:
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
-->
## How Has This Been Tested
## Testing Summary
<!-- Please describe in detail how you tested your changes. -->
### Test Details
<!-- Describe in detail how you tested your changes. -->
### Environment
<!-- Include details of your testing environment: -->
- Machine OS: <!-- The operation system of a machine you tested the PR on. (Mac | Windows | Linux | Docker + Ubuntu | other (provide the type)) -->
- Phone OS: <!-- The operation system of a phone you used to check the the PR functionality on. -->
- Library Version: <!-- The whatsapp-web.js version you used to test the PR. -->
- WhatsApp Web Version: <!-- Run `await client.getWWebVersion()` to see the WWeb version you used to test the PR. -->
- Puppeteer Version:
- Browser Type and Version: <!-- Chromium XX | Google Chrome XX | other (provide the type and version) -->
- Node Version: <!-- Run `npm -v` in your terminal to see the version of Node.js being used. -->
<!-- Provide detailed information about the environment used to test this pull request. Simply fill out the blanks with your setup. -->
## Types of changes
<!-- Operating system of the machine used for testing -->
<!-- Example: (macOS 15 / Windows 11 / Ubuntu 24 / ...) -->
<!-- What types of changes does your code introduce? Put an `X` in all the boxes that apply: -->
- Machine OS:
- [ ] Dependency change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
<!-- Operating system of the mobile device used to verify functionality -->
<!-- Example: (Android 12 / iOS 16 / ...) -->
- Phone OS:
<!-- Version of whatsapp-web.js used during testing -->
<!-- Check your `package.json` file -->
<!-- Example: (1.31.0) -->
- Library Version:
<!-- WhatsApp Web version used for testing -->
<!-- Run `await client.getWWebVersion()` to retrieve it -->
<!-- Example: (2.3000.1017054665) -->
- WhatsApp Web Version:
<!-- Browser and version used for testing -->
<!-- Example: (Chromium 120 / Google Chrome 118 / ...) -->
- Browser Type and Version:
<!-- Node.js version used during testing -->
<!-- Run `node -v` to check -->
<!-- Example: (18.16.0) -->
- Node Version:
## Type of Change
<!-- Select all that apply: -->
- [ ] **Dependency change** _(package changes such as removals, upgrades, or additions)_
- [ ] **Bug fix** _(non-breaking change that fixes an issue)_
- [ ] **New feature** _(non-breaking change that adds functionality)_
- [ ] **Breaking change** _(fix or feature that would cause existing functionality to change)_
- [ ] **Non-code change** _(documentation, README, etc.)_
## Checklist
<!-- Go over all the following points, and put an `X` in all the boxes that apply: -->
<!-- Please confirm that all relevant items below have been completed. -->
- [ ] My code follows the code style of this project.
- [ ] I have updated the documentation accordingly (index.d.ts).
- [ ] I have updated the usage example accordingly (example.js)
- [ ] My code follows the style guidelines of this project.
- [ ] All new and existing tests pass (`npm test`).
- [ ] Typings (e.g. `index.d.ts`) have been updated if necessary.
- [ ] Usage examples (e.g. `example.js`) / documentation have been updated if applicable.

20
.github/stale.yml vendored
View file

@ -1,20 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- enhancement
- bug
- WhatsApp Change
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

112
.github/workflows/format-issue-bug.yml vendored Normal file
View file

@ -0,0 +1,112 @@
name: Format Issue Body
on:
issues:
types: [opened]
permissions:
contents: read
issues: write
concurrency:
group: issue-format-${{ github.event.issue.number }}
cancel-in-progress: true
jobs:
format:
runs-on: ubuntu-latest
if: github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'bug')
permissions:
contents: read
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Parse issue form body
uses: stefanbuck/github-issue-parser@v3
id: parse
with:
template-path: .github/ISSUE_TEMPLATE/01-bug_report.yml
- name: Build formatted issue body
id: summary
env:
DESCRIPTION: ${{ steps.parse.outputs.issueparser_description }}
REPRODUCTION_STEPS: ${{ steps.parse.outputs.issueparser_reproduction_steps }}
CODE_SAMPLE: ${{ steps.parse.outputs.issueparser_code_sample }}
WHATSAPP_TYPE: ${{ steps.parse.outputs.issueparser_whatsapp_type }}
AUTH_TYPE: ${{ steps.parse.outputs.issueparser_auth_type }}
LIB_VERSION: ${{ steps.parse.outputs.issueparser_lib_version }}
WWEB_VERSION: ${{ steps.parse.outputs.issueparser_wweb_version }}
BROWSER_TYPE: ${{ steps.parse.outputs.issueparser_browser_type }}
BROWSER_VERSION: ${{ steps.parse.outputs.issueparser_browser_version }}
COMPUTER_OS: ${{ steps.parse.outputs.issueparser_computer_os }}
PHONE_OS: ${{ steps.parse.outputs.issueparser_phone_os }}
NODE_VERSION: ${{ steps.parse.outputs.issueparser_node_version }}
CHECKLIST: ${{ steps.parse.outputs.issueparser_checklist }}
run: |
{
echo 'body<<BODY_DELIMITER'
echo '## Issue Description'
echo "$DESCRIPTION"
echo ''
echo '## Reproduction Steps'
echo "$REPRODUCTION_STEPS"
echo ''
if [ -n "$CODE_SAMPLE" ]; then
echo '## Code Sample'
echo "$CODE_SAMPLE"
echo ''
fi
echo '## User Setup'
echo ''
echo '| WhatsApp | Type |'
echo '|---|---|'
[ -n "$WHATSAPP_TYPE" ] && echo "| **Account Type** | $WHATSAPP_TYPE |"
[ -n "$AUTH_TYPE" ] && echo "| **Authentication Strategy** | $AUTH_TYPE |"
[ -n "$WWEB_VERSION" ] && echo "| **WhatsApp Web Version** | $WWEB_VERSION |"
[ -n "$LIB_VERSION" ] && echo "| **whatsapp-web.js Version** | $LIB_VERSION |"
echo ''
echo '| Environment | Version |'
echo '|---|---|'
[ -n "$BROWSER_TYPE" ] && echo "| **Browser Type** | $BROWSER_TYPE |"
[ -n "$BROWSER_VERSION" ] && echo "| **Browser Version** | $BROWSER_VERSION |"
[ -n "$PHONE_OS" ] && echo "| **Phone OS Version** | $PHONE_OS |"
[ -n "$COMPUTER_OS" ] && echo "| **Running OS Version** | $COMPUTER_OS |"
[ -n "$NODE_VERSION" ] && echo "| **Node.js Version** | $NODE_VERSION |"
echo ''
if [ -n "$CHECKLIST" ]; then
echo '## Checklist'
echo '- [x] **I use the latest released version of whatsapp-web.js.**'
echo '- [x] I have searched existing issues and confirmed this is not a duplicate.'
echo '- [x] I have verified this is a library issue, not a problem with my code.'
fi
echo 'BODY_DELIMITER'
} >> "$GITHUB_OUTPUT"
- name: Update issue body
uses: julien-deramond/update-issue-body@v1
with:
issue-number: ${{ github.event.issue.number }}
body: ${{ steps.summary.outputs.body }}
edit-mode: replace
- name: Determine priority label
id: priority_label
env:
PRIORITY: ${{ steps.parse.outputs.issueparser_priority }}
run: |
if [[ "$PRIORITY" == "Low"* ]]; then
echo "label=issued low" >> "$GITHUB_OUTPUT"
elif [[ "$PRIORITY" == "Medium"* ]]; then
echo "label=issued medium" >> "$GITHUB_OUTPUT"
elif [[ "$PRIORITY" == "High"* ]]; then
echo "label=issued high" >> "$GITHUB_OUTPUT"
fi
- name: Add priority label
if: steps.priority_label.outputs.label != ''
uses: actions-ecosystem/action-add-labels@v1
with:
labels: ${{ steps.priority_label.outputs.label }}

24
.github/workflows/issue-triage.yml vendored Normal file
View file

@ -0,0 +1,24 @@
name: Issue Triage
on:
issues:
types: [opened, edited, reopened]
permissions:
contents: read
issues: write
concurrency:
group: issue-${{ github.event.issue.number }}
cancel-in-progress: true
jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label issue
uses: github/issue-labeler@v3.4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/issue-labeler.yml
enable-versioned-regex: 0

29
.github/workflows/labels-sync.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: Sync Labels
on:
schedule:
- cron: '0 0 */3 * *'
workflow_dispatch:
push:
branches:
- main
paths:
- '.github/labels.yml'
permissions:
contents: read
issues: write
concurrency:
group: label-sync
cancel-in-progress: false
jobs:
label-sync:
runs-on: ubuntu-latest
if: github.repository_owner == 'pedroslopez'
steps:
- uses: actions/checkout@v6
- uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,20 +1,20 @@
name: Lint
on:
push:
pull_request:
push:
pull_request:
jobs:
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install node v14
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm install
- name: Run ESLint
run: ./node_modules/.bin/eslint .
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install node v14
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm install
- name: Run ESLint
run: ./node_modules/.bin/eslint .

49
.github/workflows/pr-triage.yml vendored Normal file
View file

@ -0,0 +1,49 @@
name: PR Triage
on:
pull_request_target:
types:
- opened
- edited
- reopened
- synchronize
permissions:
contents: read
pull-requests: write
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
label:
name: Label PR
if: github.event.action != 'edited'
runs-on: ubuntu-latest
steps:
- name: Label pull request
uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/pr-labeler.yml
dot: true
sync-labels: true
validate-title:
name: Validate title
runs-on: ubuntu-latest
steps:
- name: Validate pull request title
env:
TITLE: ${{ github.event.pull_request.title }}
run: |
REGEX="^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types|infra)(\\(.+\\))?!?: .{1,72}$"
echo "Title: \"$TITLE\""
shopt -s nocasematch
if [[ ! "$TITLE" =~ $REGEX ]]; then
echo "❌ PR title does not match the required format!"
exit 1
fi

View file

@ -1,37 +1,55 @@
name: release
name: Release a New Version
on:
workflow_dispatch:
inputs:
release_type:
description: "`alpha`, `alpha-minor`, `alpha-major`, `release-minor`, `release-patch` release?"
required: true
default: "alpha"
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
required: true
default: 'alpha'
type: choice
options:
- alpha
- alpha-minor
- alpha-major
- release-minor
- release-patch
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
if: ${{ github.repository == 'pedroslopez/whatsapp-web.js' }}
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: git config --global user.email "hello@wwebjs.dev"
- run: git config --global user.name "WWebJS Bot"
- name: Bump version and publish to NPM
id: publish
run: ./tools/publish ${{ github.event.inputs.release_type }}
- name: Create GitHub Release
id: create_release
uses: ncipollo/release-action@v1
with:
prerelease: ${{ steps.publish.outputs.PRERELEASE }}
generateReleaseNotes: true
tag: v${{ steps.publish.outputs.NEW_VERSION }}
release:
runs-on: ubuntu-latest
if: github.repository == 'pedroslopez/whatsapp-web.js'
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Configure Git
run: |
git config --global user.email "hello@wwebjs.dev"
git config --global user.name "WWebJS Bot"
- name: Bump version and publish to NPM
id: publish
run: ./tools/publish ${{ inputs.release_type }}
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
prerelease: ${{ steps.publish.outputs.PRERELEASE }}
generateReleaseNotes: true
tag: v${{ steps.publish.outputs.NEW_VERSION }}

42
.github/workflows/stale.yml vendored Normal file
View file

@ -0,0 +1,42 @@
name: Mark Stale Issues and PRs
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
concurrency:
group: stale
cancel-in-progress: false
jobs:
stale:
if: github.repository_owner == 'pedroslopez'
runs-on: ubuntu-latest
steps:
- name: Mark stale issues and PRs
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 35
days-before-close: 7
stale-issue-label: 'stale'
stale-pr-label: 'stale'
start-date: '2026-03-03T00:00:00Z'
remove-stale-when-updated: true
exempt-issue-labels: 'pinned,security,feature request,issued high'
exempt-pr-labels: 'pinned,security,whatsapp change,approved,waiting for testers'
stale-issue-message: >
Marking this issue as stale due to inactivity. Comment or update the issue to
keep it open. It will be closed in 7 days otherwise. Thank you for your contributions.
stale-pr-message: >
Marking this pull request as stale due to inactivity. Push changes or comment
to keep it open. It will be closed in 7 days otherwise. Thank you for your contributions.
close-issue-message: >
Closing this issue due to inactivity. Feel free to reopen if it is still relevant.
close-pr-message: >
Closing this pull request due to inactivity. You can reopen it anytime to continue.

28
.github/workflows/tests.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Tests
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Node.js v20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Run Eslint
run: npm run lint

View file

@ -1,39 +1,54 @@
name: Update
on:
schedule:
- cron: "0 12 * * 0"
workflow_dispatch:
schedule:
- cron: '0 12 * * 0'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
concurrency:
group: wa-update
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tools/version-checker
update:
if: github.repository_owner == 'pedroslopez'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tools/version-checker
steps:
- uses: actions/checkout@v2
- name: Install node v16
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Run Updater
run: ./update-version
- name: Store WA Version
run: echo WA_VERSION=`cat ./.version` >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
branch: auto-wa-web-update/patch
delete-branch: true
commit-message: Update supported WhatsApp Web version to v${{ env.WA_VERSION }}
title: Update WhatsApp Web Version (${{ env.WA_VERSION }})
body: |
A new version of WhatsApp Web has been detected!
Tests should be run against this new version before merging.
labels: WhatsApp Change
reviewers: pedroslopez
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Run Updater
run: ./update-version
- name: Store WA Version
run: echo "WA_VERSION=$(cat ./.version)" >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
branch: auto-wa-web-update/patch
delete-branch: true
commit-message: 'chore: update supported WhatsApp Web version to v${{ env.WA_VERSION }}'
title: 'chore: update WhatsApp Web version (${{ env.WA_VERSION }})'
body: |
A new version of WhatsApp Web has been detected!
Tests should be run against this new version before merging.
labels: whatsapp change
reviewers: pedroslopez