MCPcopy Create free account
hub / github.com/decaporg/decap-cms / closeEntryNotesIssue

Method closeEntryNotesIssue

packages/decap-cms-backend-github/src/API.ts:1952–1967  ·  view source on GitHub ↗

* Close notes issue when entry is deleted

(collectionName: string, slug: string)

Source from the content-addressed store, hash-verified

1950 * Close notes issue when entry is deleted
1951 */
1952 async closeEntryNotesIssue(collectionName: string, slug: string): Promise<void> {
1953 try {
1954 const issue = await this.findNotesIssue(collectionName, slug, 'open');
1955 if (issue) {
1956 await this.request(`${this.repoURL}/issues/${issue.number}`, {
1957 method: 'PATCH',
1958 body: JSON.stringify({
1959 state: 'closed',
1960 labels: [...(issue.labels || []).map((l: { name: string }) => l.name), 'entry-deleted'],
1961 }),
1962 });
1963 }
1964 } catch (error) {
1965 console.warn('Failed to close notes issue:', error);
1966 }
1967 }
1968
1969 /**
1970 * Get PR metadata from branch name

Callers 1

Calls 3

findNotesIssueMethod · 0.95
requestMethod · 0.95
mapMethod · 0.80

Tested by

no test coverage detected