{"size": 470, "ext": "js", "max_stars_repo_path": "index.js", "max_stars_repo_name": "sebastianpopp/discord-action", "max_stars_repo_stars_event_min_datetime": "2021-10-29T19:37:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-28T12:21:27.000Z", "max_issues_repo_path": "index.js", "max_issues_repo_name": "sebastianpopp/discord-action", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "index.js", "max_forks_repo_name": "sebastianpopp/discord-action", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.4347826087, "max_line_length": 50, "alphanum_fraction": 0.614893617}
const core = require('@actions/core');
const axios = require('axios');

try {
  const webhook = core.getInput('webhook');
  const message = core.getInput('message');

  const options = {
    method: 'POST',
    url: webhook,
    headers: {'Content-Type': 'application/json'},
    data: {content: message}
  };

  axios
    .request(options)
    .then(() => {
      core.info('Message was sent successfully');
    });
} catch (error) {
  core.setFailed(error.message);
}
