Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Bug Report
description: Bug report to help us improve the project
title: "[Bug]: "
labels: ["Bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please provide as much detail as possible.

- type: textarea
id: what-happened
attributes:
label: What happened?
description: "Provide a clear and concise description of what the bug is. Include screenshots if possible."
placeholder: "A clear and concise description of what the bug is."
validations:
required: true

- type: textarea
id: reproduction-steps
attributes:
label: Steps to Reproduce
description: "Please provide the steps to reproduce the behavior."
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: "A clear and concise description of what you expected to happen."
validations:
required: true

- type: dropdown
id: affected-area
attributes:
label: Affected Area
description: "Which part of the project is affected by this bug?"
options:
- Website (oembed.com)
- Provider Validation Script
- GitHub Actions Workflow
- Other
validations:
required: true

- type: textarea
id: additional-context
attributes:
label: Additional Context
description: "Add any other context about the problem here (e.g., browser, OS, logs)."
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: "oEmbed Spec Question"
url: "https://github.com/iamcal/oembed/discussions"
about: "Please ask and answer questions about the oEmbed spec here."
- name: "oEmbed Website"
url: "https://oembed.com"
about: "The oEmbed official website."
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Feature Request
description: Suggest an idea or enhancement for this project
title: "[Feature]: "
labels: ["Enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to suggest a new feature! Please provide a clear and detailed explanation.

- type: textarea
id: problem-description
attributes:
label: Is your feature request related to a problem? Please describe.
description: "A clear and concise description of what the problem is. Ex. This will help with the oEmbed project to..."
validations:
required: true

- type: textarea
id: solution-description
attributes:
label: Describe the solution you'd like
description: "A clear and concise description of what you want to happen."
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: "A clear and concise description of any alternative solutions or features you've considered."

- type: textarea
id: additional-context
attributes:
label: Additional Context
description: "Add any other context or screenshots about the feature request here."
68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/provider-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Add a New oEmbed Provider
description: Request to add a new oEmbed provider to the registry
title: "Add Provider: [Provider Name]"
labels: ["Provider"]
body:
- type: markdown
attributes:
value: |
Thank you for contributing to the oEmbed provider registry! Please fill out the following fields as accurately as possible.

- type: input
id: provider-name
attributes:
label: Provider Name
description: "The official name of the service."
placeholder: "eg Example"
validations:
required: true

- type: input
id: provider-url
attributes:
label: Provider URL
description: "The main homepage for the service."
placeholder: "https://www.example.com/"
validations:
required: true

- type: textarea
id: schemes
attributes:
label: URL Schemes
description: "A list of URL schemes that the oEmbed endpoint should match. Use a wildcard (*) for variable parts. Please list one scheme per line."
placeholder: |
https://*.example.com/watch*
https://example.net/*
validations:
required: true

- type: input
id: endpoint-url
attributes:
label: oEmbed Endpoint URL
description: "The URL for the oEmbed API endpoint."
placeholder: "https://www.example.com/oembed"
validations:
required: true

- type: dropdown
id: discovery
attributes:
label: Discovery Support
description: "Does the provider support oEmbed discovery via <link> tags in their HTML?"
options:
- "Yes"
- "No"
- "I don't know"
validations:
required: true

- type: textarea
id: example-urls
attributes:
label: Example URLs
description: "Please provide at least one full, working oEmbed API URL to a valid resource that we can use for testing."
placeholder: "https://www.example.com/oembed?url=https%3A%2F%2Fwww.example.com%2Fwatch%3Fv%3DiwGFalTRHDA"
validations:
required: true
27 changes: 27 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
- name: "Bug"
color: "d73a4a"
description: "Something isn't working as expected."

- name: "Enhancement"
color: "a2eeef"
description: "A new feature or request to oembed spec."

- name: "Documentation"
color: "0075ca"
description: "Improvements or additions to documentation."

- name: "Question"
color: "d876e3"
description: "Further information is requested."

- name: "Duplicate"
color: "cfd3d7"
description: "This issue or pull request already exists."

- name: "Postpone"
color: "f9d0c4"
description: "Do not close this issue due to inactivity."

- name: "Provider"
color: "37c45a"
description: "Regarding oembed provided either existing or new one."
64 changes: 64 additions & 0 deletions .github/scripts/sync-labels.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
const fs = require('fs');
const path = require('path');
const yaml = require('js-yaml');
const { Octokit } = require('@octokit/rest');

async function syncLabels() {
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
const labelsFilePath = path.join('.github', 'labels.yml');

console.log(`Syncing labels for repository: ${owner}/${repo}`);

// Read the desired labels from the YAML file
const desiredLabels = yaml.load(fs.readFileSync(labelsFilePath, 'utf8'));
if (!desiredLabels) {
console.log('labels.yml is empty. No labels to sync.');
return;
}

// Get existing labels from the repository
const { data: existingLabels } = await octokit.issues.listLabelsForRepo({ owner, repo });
const existingLabelsMap = new Map(existingLabels.map(label => [label.name, label]));

console.log(`Found ${existingLabels.length} existing labels.`);
console.log(`Found ${desiredLabels.length} desired labels in config.`);

for (const desiredLabel of desiredLabels) {
const { name, color, description } = desiredLabel;
const existingLabel = existingLabelsMap.get(name);

if (!existingLabel) {
// Label does not exist, so create it
console.log(`- Creating label: "${name}"`);
await octokit.issues.createLabel({
owner,
repo,
name,
color,
description,
});
} else {
// Label exists, check if it needs an update
if (existingLabel.color !== color || existingLabel.description !== description) {
console.log(`- Updating label: "${name}"`);
await octokit.issues.updateLabel({
owner,
repo,
name,
color,
description,
});
} else {
console.log(`- Label "${name}" is already up to date.`);
}
}
}

console.log('\nLabel sync complete!');
}

syncLabels().catch(error => {
console.error('Error during label sync:', error);
process.exit(1);
});
Loading