How to use the github.repo function in github

To help you get started, we’ve selected a few github examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Terminal / Discord_Fork / src / pages / edit.js View on Github external
pagename: this.state.pagename,
      description: this.state.description,
      prefix: this.state.prefix,
      avatar: this.state.avatar,
      cover: this.state.cover,
      images: this.state.images,
      link: this.state.link,
      support: this.state.support,
      custom_path: this.state.custom_path,
      nsfw: this.state.nsfw === 'true' ? true : false,
    };

    if (this.state['github.owner']) {
      data.github = {};
      data.github.owner = this.state['github.owner'];
      if (this.state['github.repo']) {
        data.github.repo = this.state['github.repo'];
      }
    } else {
      data.github = null;
    }

    const filedata = `---\n${dump(data, {
      styles: {
        '!!null': 'lowercase'
      },
      sortKeys: true
    })}---\n${this.state.html || ''}`;

    return {
      data, filedata
    };